If you are dabbling in PHP for about a month, you’re probably already wondering why is everyone talking about that Laravel framework. Sure, you’ve seen the documentation and the main site with all those flashy headlines and ribbons, but you still don’t grasp the concept of the best PHP framework ever.
In that case, let me enlighten you a little bit.
Laravel is very fast and reliable framework that makes it easy for developers to start their small or a middle-sized application. This is basically it. I am sorry to disappoint you if you have expected more illustrious explanation.
Everything boils down to what is easier and faster to work with. That being said, let’s dive into some specific reasons and details.
API can be created incredibly fast with all types of authentication in place.
If your SPA app depends on a slow API and you want to speed it up a bit, I strongly suggest you build out several different entities and get those endpoints up and running, just to get the feel of simplicity and easiness of an entire deal.
You also need authentication but you don’t feel like writing a token exchange module? Not a problem. With Laravel Passport, you can rely on an OAuth 2.0 concept of a handshake.
Laravel also brings together modern web approach by using various patterns. This way you can use all the benefits of PHP 7+, with return types, type hinting, scalar types, and so on.
Patterns in laravel are divided into three types:
- Creational Patterns (Factory, Builder, Prototype, Singleton)
- Structural Patterns (Adapter, Bridge, Decorator, Facade, Proxy)
- Behavioural Pattern (Command, Iterator, Observer, State, Strategy)