Laravel 5.2 is now officially released!

There are many new features. Let's check them out:

Middleware Groups

Middleware groups is a really good feature that you may want. You can now apply group of middlware to routes

enter image description here

MySQL JSON Column Types

Laravel 5.2 now adds support native JSON data type

Form Array Validation

Now you can add validation rules to loop through arrays automatically and validate those arrays for you.

Form input:

<input type="text" name="post[1][id]">
<input type="text" name="post[1][title]">

<input type="text" name="post[2][id]">
<input type="text" name="post[2][title]">

Validation rules:

Validator::make($request->all(), [
  'post.*.id' => '',
  'post.*.title' => 'required:string',

Database Session Driver

The database session driver now includes user_id and ip_address.

Collections Wildcards

You can use * as a wildcard to get data from a collection


Auth Scaffolding

Want a set of view files for authentication, registration, and password resets? You can easily generate those using:

php artisan make:auth

Implicit model binding

Now you can tell Laravel to automatically binds a model to a route:

Route::get('/posts/{post}', function(Post $post) {
    return $post;

Laravel will run Post::findOrFail($post) and inject the result into the $post variable automatically! Cool!

Authentication Drivers / "Multi-Auth"

In Laravel 5.2, you may define additional authentication drivers as well define multiple authenticatable models or user tables. For example, if your app has multiple tables, you may now use the Auth methods to authenticate against each of these tables separately.

Eloquent Global Scope Improvements

In Laravel 5.2, global query scopes only require you to implement a single, simple method: apply.

Rate Limiting

You can now easily limit the number of requests that a given IP address can make to a route. To limit a route to 30 requests every minute from an IP address, you can do like this:

Route::get('/dashboard', ['middleware' => 'throttle:30,1', function () {


You can check the official release notes here:

Also, let's check the upgrade guide to upgrade your app:

Be sure to join our newsletter to get latest news and freebies.