Recs.
Updated
SpecsUpdate
Pros
Pro Good for building RESTful APIs
With migrations, powerful and intuitive Eloquent CRUD, resource routing, and simple JSON response out of the box, a complete backend can be written in hours.
Pro Allows for configuration and extending
Laravel allows for free configuration and does not force developers to use a single project structure, instead they can change it to how they wish. It also uses Composer as a dependency manager which allows developers to extend their Laravel application with additional libraries.
Pro Good documentation
Laravel's documentation is thorough and very good. It covers everything and is very helpful to experienced and new users alike.
Pro Handles event queuing
Laravel supports event queuing and it does so in a very simple way. To create an event that should be queued just run:
php artisan handler:event SendPurchaseConfirmation --event=PodcastWasPurchased --queued
This creates a handler that implements the Illuminate\Contracts\Queue\ShouldBeQueued
interface. Now when this handler is called it will automatically be queued by the event dispatcher.
Pro Gulp tasks in the form of Laravel Elixir
In Laravel 5.0 they added Laravel Elixir, which provides an API for using Gulp tasks for Laravel applications. Elixir supports several CSS preprocessors and even some test tools. But it's still in the early stages of development and it will be developed even further in the following releases. With more methods and more Gulp tasks supported.
Pro Can use Symfony components
Laravel uses many libraries built for the Symfony PHP framework. Many of these libraries are well-built and have been tested by users before. Since the point of using a web framework is to shorten development time and to avoid reinventing the wheel for problems that have already been solved, then it's logical for a framework to use libraries already built to solve problems that have already been solved.
Pro Extremely powerful template system
Laravel has a powerful template system called Blade. It's quite similar to Twig or Moustache with lots of curly braces but the real power comes from the usage of PHP code directly in the view. Blade templates compile directly to raw PHP and are processed in the server when a request is made.
Pro Easy to build dockerized container for Enterprise App
Laravel source code base is tiny with packed features, which makes it ideal to build micro service based container. You can build your own Docker containers and host app in single docker container that also provides PHP and NGINX web server.
Cons
Con Bloated
The problem with frameworks that take this approach is that they quickly become too bloated. This leads to slow performance, but also maintenance problems, more attack vectors, etc. It also leads to more updates which means you need to constantly stay in the loop and maintain things.
Con Steep learning curve
While a lot of times you can write things in plain PHP, it will hinder you down the line when you want to use core features and find that you have to rewrite code which then causes issues throughout the app. Documentation is good, but you need to know what you are looking for and practical examples are non-existent. Many features have been updated throughout the versions in such a short time that tutorials you find online are confusing to sort through outdated tutorials and guides that no longer work or have been depreciated.
Con Slow performance
Bootstrap process is slow. Reliance on Composer for autoloading is partially to blame. Symfony core underneath is also part to blame. Bloat is to blame too (lots and lots of things come with Laravel out of the box which obviously increases its footprint). Note this performance concern may not be a huge issue or deal breaker for many, but it's measurable and considerable when compared to other PHP frameworks.
Recommendations
Comments
Flagged Pros + Cons
Con Slow Bootstrap
Laravel has two primary configuration files for it's bootstrapping:
https://github.com/laravel/laravel/blob/master/app/Http/Kernel.php
https://github.com/laravel/laravel/blob/master/config/app.php
The Kernel defines some global middleware that execute on every request, while app.php registers several service providers which go through two booting phases:
- Registration, which is the first to happen
- Boot, which is executed after all the other service providers are registered.
Another reason why Laravel's bootstrapping is slow is because Laravel sits on top of Symfony's HTTPFoundation, which is relatively heavyweight.