Introduction to Laravel 5
Since its initial release in 2011, Laravel has experienced exponential growth. It centers around the end client first, which implies its emphasis is on effortlessness, lucidity, and completing work. Individuals and organizations are utilizing it to assemble everything from straightforward diversion extends the whole distance to Fortune 500 organizations.
Laravel is an MVC framework with bundles, migrations, and Artisan CLI. It offers a robust set of tools and an application architecture that incorporates many of the best features of frameworks like CodeIgniter, Yii, ASP.NET MVC, Ruby on Rails, Sinatra, and others.
Laravel is an Open Source framework. It has a very rich set of features which will boost the speed of Web Development. If you are familiar with Core PHP and Advanced PHP, Laravel will make your task easier. It will save a lot of time if you are planning to develop a website from scratch. Not only that the website built in Laravel is also secure. It prevents the various attacks that can take place on websites.
How to install Laravel
Step 1: Download composer to install it on your system.
Step 2: After the Composer is installed, check the installation by typing the Composer command in the command prompt as shown in the following screenshot.
Step 3: Create a new directory anywhere in your system for your new Laravel project. After that, move to the path where you have created the new directory and type the following command there to install Laravel.
Step 4: The above command will install Laravel in the current directory. Start the Laravel service by executing the following command.
Step 5: After executing the above command, you will see a screen as shown below:
Step 6: Copy the URL underlined in gray in the above screenshot and open that URL in the browser. If you see the following screen, it implies Laravel has been installed successfully.
Advantages:
- Composer
- Laravel functionality depends on many external packages. To do this, you need to use composer as dependency manager. It is easy for beginners to start it’s set up easily.
- Artisan
- Artisan is a powerful tool because it has the ability to run different tasks from the command line. Just typing “PHP Artisan” in your command line and you will see available commands.
- Database migration and seeds
- Laravel includes a simple method for testing data using Database Seeder. Seed classes may have any name as you wish but probably should follow some sensible convention, such as UsersTableSeeder, etc.
Disadvantages:
- The namespace is used everywhere, so it is necessary to implement it in the whole app.
- The facades are just the alias of the class but it is used as the proxies.
- Problems with changing the version of the application.