Laravel is the perfect choice for the huge website and application development projects. Continuous improvements and technical enhancements make it the first choice of the web developers. The company has recently announced the latest version of the framework Laravel 5.2. Laravel 5.2 contains all the features of Laravel 5.1. It is also backed with some other technical improvements like multiple authentication driver support, simplified eloquent and impact model binding etc. Today, we are going to discuss 10 amazing features of Laravel 5.2.
Almost every website have the functionality of account registration, user profile creation, user dashboard and user memorization features. Implementing all these functionalities is a tedious task for any developer. Laravel makes it simple to handle the authentication on the back-end and provides the lightning fast way to scaffold the authentication views for front-end. You can use ‘make:auth’ command to execute the authentication scaffolding function.
Laravel Cashier offers a fluent subscription billion solutions. Laravel 5.2 handles almost all boilerplate subscription-billing codes. Along with the basic subscription management, Laravel Cashier can also handle coupons, swapping subscription, subscription “quantities”, cancellation grace periods, and even generate invoice PDFs. Laravel 5.2 supports stripe and Braintree payment gateway.
Socialite is a Laravel 5.2 feature that lets users log in using their Facebook account. You can also apply this socialite authentication technique with other social media networks like Twitter, Gmail etc. Laravel 5.2 offers easy authentication with OAuth using Socialite. Laravel Socialite officially supports authentication with Facebook, GitHub, Google, Twitter and Bitbucket.
Array validation is another excellent feature of Laravel 5.2. Laravel provides several different approaches to validate the incoming data. Form Request Validation is one of those approaches that make complex form validation process easy. You can add validation rules to loop through incoming arrays and automatically get the data validated using single validation rule.
Laravel 5.2 supports server-monitoring package for monitoring the disk usage, HTTP ping monitors, and SSL certificate monitors. Server Monitoring Commands also provides an alarm status notification.
API rate limiting
Rate limiting is a tool that is generally used to limit the rate at which any individual can request. It is generally used in API. Developers were forced to use 3rd party libraries or packages to get this feature in Laravel 5.1. It is default functionality now in Laravel 5.2. It generates different status codes (i.e. 200 – OK or 429 – too many requests) based on the limiting value.
Multiple authentication guard
Laravel 5.2 has significantly improved the entire authentication system and made it simple to have multiple ‘guards’ running at once. Default authentication guard prior Laravel 5.2 was traditional web based application authentication layer. Now you can also use API, which is a stateless token-based driver as authentication layer.
Eloquent global scope
Global scopes come into picture when you want to apply constraints to all the queries of the specific model. Creating your own global scope is very easy and needs to follow below steps
- Define a class which implements the following interface and in which implement apply method, in apply method where rule can be used if needed for the query IlluminateDatabaseEloquentScope
- Apply Global scope for that simply overrides the boot method of the model you can also remove global scope in case needed.
MySQL JSON column types
Middleware group is a feature that every developer wants. It allows you to bind a single key to several route middleware. Laravel 5.2 maintains the code or its readability through this new feature.
So, these are top 10 features of the Laravel 5.2. Laravel is the most demanding framework in the community and continuous development keeps the platform up to date.