php laravel
php laravel
hello folks
today we gonna learn learn about "php laravel"
as you all know php is a widely-used open source general-purpose
scripting language that is especially suited for web development and
it can be also embedded into HTML...
there are so many frameworks of PHP
- Laravel.
- Symfony.
- Zend Framework.
- CodeIgniter.
- CakePHP.
- FuelPHP.
- Yii 2.
- Phalcon.
today i am going to walk you through laravel
featureas of laravel-
1. Automatic pagination
The paginate method provided by Laravel automatically takes
care of setting the proper limit and offset based
on the current page being viewed by the user.
2. View composers
The view composer is one of the most important
features of Laravel which makes sure that the controllers
load a bunch of data from models for views which is not
related to that method’s page content.
3. Routing system
Laravel provides the flexibility to its developers
to choose which route is triggered on the application.
Laravel routes are defined in the app/Http/routes.php file,
which is automatically loaded by the Laravel framework.
The most basic Laravel routes simply accept a
URI and a Closure, providing a very simple and
expressive method of defining routes.
The Laravel developer just need to enter the name of the
route and it will automatically insert the correct URI.
4. Unit testing
Laravel enables its web artisans to test their
code in the best way possible. Using the Artisan
command line utility, laravel developers
can write their own multiple unit tests easily.
features of laravel famaous
among developers
1. .Template Engine
2. MVC Architecture Support
3. Eloquent ORM (Object Relational Mapping)
Laravel offers Eloquent Object Relational Mapping (ORM)
which includes a simple PHP Active Record implementation.
4. Security
Laravel framework offers very strong web application security.
5. Artisan
6. Libraries & Modular
7. Database Migration System
8. Unit-Testing
@@ okay now let me walk you through the
installation process of laravel@@
we have some some requirments for installation of laravel
it comes with latest version of php
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Ctype PHP Extension
- JSON PHP Extension
- BCMath PHP Extension
what is composer ??
composer is php dependancy manager
- Composer you can download and install composer by clicking this link
- open cmd ( terminal ) write composer and HIT Enter to
make sure that composer is installed in your in your system
- use this command to download and install laravel
Make sure to place composer's system-wide vendor bin directory in
your
$PATH
so the laravel executable can be located by your system.
This directory exists in different locations based on your operating system;
however, some common locations include:
- macOS:
$HOME/.composer/vendor/bin
- GNU / Linux Distributions:
$HOME/.config/composer/vendor/bin
- Windows:
%USERPROFILE%\AppData\Roaming\Composer\vendor\bin
- Once installed, the
laravel new
command will create a fresh Laravel installation in the directory you specify. For instance,laravel new blog
will create a directory namedblog
containing a fresh Laravel installation with all of Laravel's dependencies already installed:laravel new blog
Via Composer Create-Project
Alternatively, you may also install Laravel by issuing the Composercreate-project
command in your terminal:composer create-project --prefer-dist laravel/laravel blog
Local Development Server
If you have PHP installed locally and you would like to use PHP's built-in development server to serve your application, you may use theserve
Artisan command. This command will start a development server athttp://localhost:8000
:php artisan serve
Configuration
Public Directory
After installing Laravel, you should configure your web server's document / web root to be the
public
directory. The index.php
in this directory serves as the front controller for all HTTP requests entering your application.Configuration Files
All of the configuration files for the Laravel framework are stored in the
config
directory. Each option is documented, so feel free to look through the files and get familiar with the options available to you.Directory Permissions
After installing Laravel, you may need to configure some permissions. Directories within the
storage
and the bootstrap/cache
directories should be writable by your web server or Laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.Application Key
The next thing you should do after installing Laravel is set your application key to a random string. If you installed Laravel via Composer or the Laravel installer, this key has already been set for you by the
php artisan key:generate
command.
Typically, this string should be 32 characters long. The key can be set in the
.env
environment file. If you have not renamed the .env.example
file to .env
, you should do that now. If the application key is not set, your user sessions and other encrypted data will not be secure!Additional Configuration
Laravel needs almost no other configuration out of the box. You are free to get started developing! However, you may wish to review the
config/app.php
file and its documentation. It contains several options such as timezone
and locale
that you may wish to change according to your application.
You may also want to configure a few additional components of Laravel, such as:
Web Server Configuration
Pretty URLs
Apache
Laravel includes apublic/.htaccess
file that is used to provide URLs without theindex.php
front controller in the path. Before serving Laravel with Apache, be sure to enable themod_rewrite
module so the.htaccess
file will be honored by the server.If the.htaccess
file that ships with Laravel does not work with your Apache installation, try this alternative:Options +FollowSymLinks -Indexes RewriteEngine On RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]
Nginx
If you are using Nginx, the following directive in your site configuration will direct all requests to theindex.php
front controller:location / { try_files $uri $uri/ /index.php?$query_string; }
laravel provides most secured web apps , including dashboard and so ON
they have super easy documentation to read and understand
here is a walk through video provided by laravel :
https://laracasts.com/series/laravel-from-scratch-2018
Cool Broda
ReplyDeletethanks bhaiya
DeleteGreat! You have share your interesting ideas to us: Click for IT Solutions
ReplyDeleteit solutions company
it infrastructure consulting services
dubai cctv company
ip pbx dubai
dubai web developer
software development company uae
mobile app development company in dubai
email marketing dubai
White Star Net Solutions
Good job! For Sharing your best ideas... I will refer the people to best learning and training Institute for online courses... click the below link:
ReplyDeleteshort courses in pakistan
react native advanced concepts
sorting algorithms c++
graphic designing institute
mern stack course online
php training institute
e commerce online course in pakistan
Online short courses in Pakistan
Tech Inn Solutions
Good Job! You have Shared your well knowledge... I will refer the people to the best IT Solutions providers click the below link:
ReplyDeleteit solutions website
pakistan web developer
app development in pakistan
software developers in pakistan
digital marketing in pakistan
website maintenance packages
professional it consulting services
Cre8tivebot
Software Development in Pakistan