Laravel is a most powerful framework of PHP which is a purely depends on PHP artisan command. In this post I want to explain how to install and setup laravel on localhost environment. Laravel is created by Taylor Otwell and first beta version released in 2011, It is a fully followed the MVC structured and artisan command laravel is the best php framework comparison to CodeIgnitor,Yii2 etc.
Laravel framework Features
- Bundles provide a modular with bundled features already available for easy addition to applications. Laravel use Composer as a dependency manager to add framework.
- Object relation mapping is an advanced PHP implementation of the active record pattern, providing at the same time internal methods for enforcing constraints on the relationships between database objects.
- Laravel provide Query builder more direct database access alternative to the Eloquent Object Relational Mapping. Instead of requiring SQL queries to be written directly, Laravel’s query builder provides a set of classes and methods capable of building queries programmatically.
- Laravel provide blade templating in laravel all view file created with .blade.php extension . Blade also provides a set of its own control structures such as conditional statements and loops, which are internally mapped to their PHP counterparts.
- In laravel all controllers are rest full serving the HTTP request GET,POST etc.
- Laravel provides database migration and seeding command.
Lets start Laravel Installation
Follow the steps for installation process
- First start the server and open the your command prompt. If you have installed Git then open the git command prompt or open the window command prompt. If you have Linux user then open your terminal.
- And use command
composer create-project --prefer-dist laravel/laravel blog and enter.
- After that It will take few seconds and install all dependencies and laravel core files and one folder is created in your project root folder.
- When Its complete process then use cd command for project directory after that use
php artisan serve command. This command create virtual hosting for your project.
- Now open your browser and copy the generated laravel development server url which is define in below image
- Now your project laravel default welcome page display on screen same as screenshot which is given below
Now Laravel is installed and now lets start work with laravel framework and enjoy. If you want to learn laravel from beginners to advance level then follow my laravel blog post and learn from beginners to advance level.