The most discussed and used frameworks nowadays by developers is Laravel of course. The reason behind of its popularity are many. Laravel has some unique features along with common features compared with others frameworks like CI, Symphony, Phalcon etc. Because of having extra security layers, speed , user friendly environment laravel has grown up in the market rapidly. Laravel has also noticed by the developers for its time saving facility and and fast development. Use of modern technology MVC, robust features, OOP and so on has made laravel more unique as well as different from others. All of these features has given laravel a unique identity in the market.
- Documentation and Guideline
- MVC Pattern
- OOP Implemented
- Database Seeding
- Multi Database Usage Facilities
- Artisan Command/CLI
- Route System(Middleware, Routing)
- Blade Templating
- Unit Testing
- Proper Support and Community
- Upgrage and Package Supply
Documentation and Guideline
Laravel has enriched and user friendly documentation system. Any developer or learner or even beginner can start laravel by going through on it. Laravel documentation is written by following easy standard for all. Every topics and class methods or even namespace usage has been discussed clearly on there.
Laravel framework is built by following mvc(model view controller) pattern. In MVC pattern there are model view controller. Here in laravel inside Http folder there are controllers, inside app folder there are model and views are keept inside resources folder. At first controllers recieve request, analyze it and redirects to specific route according to user request. Other design patterns has also been used in Laravel. Here is folder structure of laravel.
Object oriented programming(OOP) is a modern way of software development in industry. Using oop in software development has made works easy and efficient. In Laravel OOP has been implemented very strongly. Class, object , encapsulation, trait, inheritance, interface and other parts of OOP has been used in Laravel. For this reason, Laravel framework folder structure and development process has become completed in a structured way.
In raw php every database related work should be done by hand. Here it is needed to create table, make foreign keys, insert dummy data and so on. But Laravel has appeared with ignoring all this boring tasks. In laravel it is only needed to make connection using .env file. After that, rest of the work will be done with the help of Laravel. Laravel migration helps to create table, table column as much as need. Because of using migration there is no need to export database of local environment and also during sharing project with other developers. It will automatically create database table by php artisan migrate:fresh command. It is possible to generate and insert unlimited dummy data by the help of popular package faker along with seed facility in Laravel.
Multi Database Usage Facility
Laravel gives opportunity to deal with multi database such as MySQL, Oracle, SQLite, PostgreSQL etc. For Using several type of database there is no need to use special works. It only need to use default driver inside config\database.php file. As Laravel uses PDO(PHP Data Object) driver to deal with multiple database, it can handle all types of works related to database.
Artisan or CLI Command
Most popular and effective feature of Laravel is Artisan or CLI command. Most of the developers prefer to use terminal/cmd during development. To make proper use of terminal Laravel has come with enriched CLI facilities. From terminal it is possible to start development server(usually starts at port 8000), make controllers, models, factory, migration, database interaction easily. Base command for Laravel artisan is php artisan. Here all commands are available for laravel Artisan click here
Route System, Middleware
Laravel has enriched features of working with routes. In laravel it is possible to create any kind of routes according to project needs. Routes usually situated at routes/web.php. A developer can make single route, route group, prefix for all routes etc. Middleware is an another technology of Laravel for controlling routes. Through middleware it is possible to redirect any request to specifict routes. Middleware also can help authentication during login. Below there is a demo routes of a project.
Blade template engine is an awesome tool of Laravel. Laravel use blade special kind of php file that includes .blade.php; This indicates laravel to use blade templating engine. Blade is mainly used for viewing html data in webpage and in this file every php syntax is written with the help of @.
We write in php file like below
// code here
But in blade file developer has to write like below
Laravel Unit Testing
Laravel provides pre-built unit testing feature for making unit test of a laravel application. Unit testing folder is different project directory and it has feature, test option.