9series
Technology

What’s New to Laravel 5.2?

December 28, 2015

laravel_5.2

PHP is known to have a less than desirable syntax, it is easy to deploy, easy to use and is actually powering countless modern websites which are used day-to-day. Laravel is a free open source framework available for developers which is based on PHP programming language. It provides beautiful shortcuts, tools, and components that assist in accomplishing all web based projects. Laravel aims to fix some of PHP’s flaws as well.

The beauty of using Laravel is that it has a creative and semantic syntax that makes it outstanding among various frameworks available for the programming language. It is a perfect choice for amateur projects as well as enterprise solutions. There are continuous improvement & enhancements in Laravel framework by the community developers. The recent announcement of Laravel 5.2 update contains few excellent new features. It continues the improvements made in Laravel 5.1 by adding multiple authentication driver support, simplified eloquent global scopes, implicit model binding, middleware groups, opt-in authentication scaffolding, array validation improvements, rate limiting middleware, and more.

Have a look on new features Laravel 5.2 are:

Authentication Scaffolding

Laravel already makes it simple to handle authentication on the back-end; however, Laravel 5.2 provides a handy, lightning-fast way to scaffold the authentication views for front-end. Simply execute the make:auth command on terminal:

php_code_3

This command will generate plain, Bootstrap compatible views for user registration, login and password reset. The command will also update routes file with the relevant routes.
(Note : This feature is only meant to be used on new apps, not during application upgrades.)

Authentication Drivers / “Multi-Auth”

In former versions of Laravel, only the default, session-based authentication driver was supported out of the box, and a user could not have more than one authenticatable model instance per application.

However, in Laravel 5.2, a user can define additional authentication drivers as well define multiple authenticatable models or user tables, and manage their authentication process independently from each other. For eg, if an application has one database table for “student” users and another database table for “admin” users, a user may now use the Auth methods to authenticate against each of these tables individually.

Implicit model binding

Implicit model binding is the latest feature which automatically binds a model to a route. Below is an example in code:

php_code_7

What this does is behind the scenes call php_code_2 and inserts it into the $post variable. In Laravel 5.1, it would need to practice the Route::model method to instruct Laravel to inject the AppUser instance which matches the {user} parameter in route definition. Therefore, in Laravel 5.2, the framework will automatically include this model based on the URI segment, allowing to quickly gain access to the model instances user require.

Array Validation

This is very excellent feature. For example: you have a form with an array of input fields like this:

php_code_5

While in Laravel 5.1 to add validation rules, it required looping through and adding the rules separately. Instead of having to do all that it’s been “Laravelized” into this:

php_code_6

Middleware Groups

Middleware groups enable to group many route middleware below a single, convenient key, allowing to assign several middleware to a route at once. For eg, this can be useful when building a web UI and an API within the same application. The user may group the session and CSRF routes into a web group, and possibly the rate limiter in the api group.

Rate Limiting

A latest rate limiter middleware is presently included with the framework, facilitating to easily restrict the number of requests that a given IP address can make to a route over a particular number of minutes. For eg, to limit a route to 60 requests every minute from a single IP address, user may do the following:

php_code_4

Collections Wildcards

When utilizing a collection and wanting to pull out data, user can now pass a * as a wildcard:

php_code1

Eloquent Global Scope

In earlier versions of Laravel, global Eloquent scopes were complex and error-prone to implement; though, in Laravel 5.2, global query scopes only require to implement a single, simple method: apply.

Database Session Driver

The database session driver now covers user_id and ip_address so user can easily clear all sessions for a given user.

Hence, Laravel helps the application to stay alive and relevant utilizing established software development patterns. Using Laravel framework is definitely beneficial to your business from technology point of view. 9series Laravel developers have successfully developed software solutions employing Laravel framework. Our efforts are always focused towards exploring business problems, identify it and fix it using the latest & right technologies such as Laravel. You can contact us for your Laravel Development Requirement.

Image source- Laravel blog

 

Read our Recent Articles

Why Marketing Agencies Are Losing Their Most Valuable Asset: What to Do About It 
AI Solutions / Digital Marketing

Why Marketing Agencies Are Losing Their Most Valuable Asset: What to Do About It 

When your top strategist resigns, you don’t just lose a person. You lose three years of client context, campaign logic,...

9 min read • Apr 8, 2026 Read more
The EPA’s PFAS Reporting Window Is Open. What Chemical Manufacturers Need to Know Before October 13, 2026
AI Solutions / Chemical Manufacturers

The EPA’s PFAS Reporting Window Is Open. What Chemical Manufacturers Need to Know Before October 13, 2026

As of April 13, 2026, the EPA’s PFAS reporting window under TSCA Section 8(a)(7) is open. Every chemical...

13 min read • Apr 1, 2026 Read more
AI Powered Community Banking: Why Automation Is the New Relationship Moat in Modern Banking
AI Solutions

AI Powered Community Banking: Why Automation Is the New Relationship Moat in Modern Banking

What is AI Powered Community Banking?  AI powered community banking is the use of artificial intelligence, built on a...

10 min read • Mar 25, 2026 Read more

Let's Discuss Your Strategic Technology Initiatives

Partner with 9series to accelerate your digital transformation journey. Our enterprise architects are ready to design solutions tailored to your unique challenges.

Trusted by global partners

Nailbiter NUs Safaricom Intuify Solvit i-banq Fractal