What is wrong with Laravel, the most popular PHP framework?
Laravel, one of the most popular PHP frameworks nowadays, is not necessarily the best one. It has great benefits, indeed — yet it also has some important limitations. We will take a closer look at why Laravel is great for small-to-medium sized projects done by PHP artisans and why it is not so popular amidst the corporate professionals.
Laravel has really transformed the way PHP developers create websites and applications. It is the most starred PHP framework on GitHub — yet it is by far not the best one. Why is it so?
What is a framework, first of all?
A framework is a software or a logical concept developed to act as a guideline or tool for achieving some result, which builds upon the initial concept to provide a product or useful outcome. In terms of PHP, a framework is a collection of classes, enabling the developers to deliver apps faster.
Laravel is an open-source PHP framework that allows PHP developers to create good-looking and functional websites and apps in literally no time. Mastering the basics of Laravel on your own is quite possible, as Laravel technical documentation is really in-depth and clear. This is the most popular PHP framework on Github as of 2017, introduced in 2011 by Taylor Otwell in an attempt to improve the functionality provided by CodeIgniter (which lacked built-in authorization and authentication possibilities back then).
Over the passing years, Laravel became the most widely used PHP framework, due to its rich number of features, built-in functionality and variety of packages available. Below we describe the Laravel features that make it shine — and explain why Laravel is not that great after all.
Key Laravel features
There is a multitude of Laravel benefits and great features, and every developer can make their own list why Laravel is so great for them. We simply list the most significant Laravel advantages from our point of view:
- Concise logics (URL routing is easy)
- Contracts and UI customization
- Big and helpful community
- Laravel ecosystem
- Lots of packages for custom solutions
- Artisan CLI
- Native support for OAuth2 and packages for SaaS development
- Convenient API implementation
- Can serve as the basis for a CMS (October CMS)
- Detailed and on-point documentation
- Multiple tutoring programs and certification
We provide a rundown of these benefits in more details below.
URL routing out-of-the-box
Routing is really as easing as defining the URL and the destination page (Closure), allowing for quite an expressive routing description method. The developers can group the routes with ease, create all the needed resources for CRUD pages, attach various filters and bind the models to certain request parameters.
To say more, the PGP developers can nest routes into one another and even implement versioning atop of them, with a simple ‘v1’ prefix. Then one can copy the code and add the ‘v2’ prefix (i.e. when the new API version is needed), and implement the new logic, with the new references to actions, controllers and other resources.
Contracts and UI customization
All the modules available with Laravel are fully customizable. The developer can change any needed value to create unique and immersive user experiences, non-standard interfaces and neat solutions that can really stand out from the competition.
Laravel contracts are a finely-set set of PHP interfaces, which describe the methods of operations for the core services of the framework, like queuing jobs or emailing. Each contract is implemented in the framework and has interaction points with all the required modules, so even the most intense customization will not leave the module inoperable.
Laravel community is a big and devoted one
When PHP developers worldwide began to realize the potential of Laravel and understood it helps replace hours of writing custom code with minutes of using built-in modules — this framework got a big, passionate and constantly growing community. As of 2018, it is the most popular PHP framework, with more than 40 million downloads from Github. To say even more, when it became open source, developers worldwide were able to create their own packages, further extending its functionality.
As a result, Laravel is constantly updated and supports all the latest developments of PHP, becoming the tool of choice for creating small-to-medium web applications. Laravel enables PHP developers to produce neat websites fast, and if a developer meets a problem he cannot solve with the documentation — there always is a community ready to help! To say more, Laracasts is a great way to learn the ropes and advanced Laravel tricks. These screencasts can be immensely valuable for any Laravel developer, so we endorse you to try them out!
Laravel has a great software ecosystem
Forge, the Laravel product built by Taylor Otwell, is centered at the ease of provisioning and managing PHP applications. It allows to rapidly launch and flexibly manage any amounts of PHP applications across a variety of cloud service providers, including AWS, DigitalOcean, and Linode. The tool helps build queues really easy and provides lots of useful features, including free SSL certificates.
Laravel Spark (not to be confused with Apache Spark used for processing Big Data), is the true superhero Laravel package. It comes packed to the brim with the code needed to build apps and provides more than 10 most often required features out-of-the-box. Profile authorization, profile photos, invoices and billing, password reset and user authentication, and lots, lots more. Spark is really one of the reasons that make Laravel shine.
Horizon is a robust queue monitoring tool from the core developers of Laravel. It provides a powerful instrument to deploy, configure and monitor Laravel Redis queues, complete with a neat dashboard and easily adjustable code-driven settings. It is open-source and provides the PHP developers with the perfect means to look under the hood of their Laravel applications and control what’s going on.
Envoyer is the deployment automation tool enabling any developer to deliver their code to the end customers across any infrastructure without any downtime. Using Envoyer ensures the user experience is uninterrupted, the app is updated instantly and if any rollback is needed — it is done instantly.
Lumen micro-framework is one of the products that form the Laravel ecosystem. It is really blazing fast, just as its title (“light” from Latin) suggests. It helps create clean and functional APIs and well as flexible microservices with the main emphasis on speed. This helps the developers to experiment and build app prototypes fast. In addition, the code written in Lumen can be easily pushed to Laravel with no additional effort to transform a test project into a full-scale Laravel app in no time.
These are the main products that thrive upon Laravel and form a constantly growing ecosystem aimed at ensuring the convenience and efficiency of PHP development using Laravel.
Lots of packages for custom solutions
Laravel basic features can be extended with literally any package you might wish to add. The functions like authentication, API authentication, authorization, encryption, caching or password reset — all these packages are available from the start and more can be downloaded from the official Laravel Socialite site. There are also more than 14,000 community packages freely available from Packalyst, which allow finding the best fit for any case.
API Authentication with Passport and SaaS development packages for security
Laravel provides a fully-configured OAuth2 server you can deploy with several commands. This enables swift and easy API authentication through the Laravel feature called Passport.
Laravel leverages the prepared SQL statements to disable the injection attacks, along with a simple way to prevent taking the user input the injection with a tag. The framework also comes with several more SaaS development packages for OpenSSL encryption, Bcrypt and Argon2 hashing, and convenient facades for password reset. Everything possible was done to enable a PHP artisan to construct a decent and secure software with little effort.
Artisan is a convenient Command Line Interface (CLI) tool that is provided with Laravel. This essentially is a Symphony command console, yet with a greatly increased functionality. It allows interacting with any part of your app through one command line using Tinker, a REPL tool. The developers can also write their own commands, store them in any directory they wish (as long as it can be loaded by the Composer). Using Artisan helps the developers avoid the majority of the tedious repetitive manual coding tasks entirely.
Convenient API implementation
All the moving parts of the framework are loosely coupled to enable them to interact with each other and various custom modules through a convenient, clean and functional API. All the tasks from query building and migrations to enabling various automated tests are designed to work as simply and seamlessly as possible, with minimal involvement of the programmer.
Can serve as the basis for a CMS
Laravel serves as the basic PHP framework for October CMS. This is a decent product that is now actively developed and allows any PHP developer to launch a blog or website themselves, without the confines and restrictions of WordPress, and with utilizing the full potential of Laravel. Working with October CMS is faster, simpler and much more customizable than with a standard WordPress website.
Detailed and on-point documentation
We have already mentioned the depth and fullness of Laravel technical documentation. Even a beginner PHP developer can understand all the concepts and use all the possibilities provided by the framework. Each feature is described with the code examples and with cross-references to all the resources needed to comprehend the material.
Multiple tutoring programs and certification
Laravel community provides another great benefit to all the PHP developers working with the framework. There are lots of passionate tutors who can always help the newbies master all the possibilities of Laravel ecosystem quicker. There is a possibility of certification to confirm the level of expertise with Laravel and there is a plenty of possibilities to take part in the further evolution of Laravel.
With this all being said, it seems Laravel is the star on the PHP scene, an example of what to aim for and how to develop PHP apps, isn’t it? Well, normally, this list of 10 Laravel benefits would be the end of it (with some authors concentrating more on using Eloquent ORM, Blade, unit testing, queuing and background jobs, etc.)
However, the point is that when a PHP developer masters Laravel quite well, the understanding of certain important architecture issues and peculiar dependencies comes. These are not necessarily limitations, yet certain things can be done only one way with Laravel.
Conclusions of what is wrong with Laravel
As you can see, Laravel is an excellent tool overall. It provides all the pieces and handles to build a decent small-to-medium product or application quite fast. IT Svit uses Laravel to build various CRM systems, business solutions, and bespoke products. This is one of the areas where we canand satisfy all the expectations of our customers. However, due to a number of reasons, Laravel cannot be used for enterprise-grade software development, and IT Svit can provide Symphony specialists for that purpose.
For example, there is a decent, where multiple developers expressed their opinions on why Laravel is actually quite poorly designed. The majority of the comments revolve around using Facades and Eloquent ORM, as they actually quite limit the ways one can implement the needed dependencies.
What’s even more worrying, the latest releases of Laravel have brought no new disruptive features. Instead, they were concentrating on further enriching the existing ecosystem, adding new features to the available products and polishing rather small details. Now, we do not say this is bad. However, this might look like Laravel is losing the impulse of further evolvement — and this, in turn, might lead it to lose the competitive race.
What do you think about it? Is Laravel your tool of choice for PHP development? What do you like or not like about this framework? Please share your opinion!