Support the ongoing development of Laravel.io →
Security Requests
Last updated 2 years ago.
0

In Laravel 4 all you had to do was something like this:

Route::get('/', ['uses' => 'HomeController@index', 'before' => 'filter1|filter2', 'after' => 'filter3|filter4']);

or

Route::get('/', ['uses' => 'HomeController@index', 'before' => ['filter1', 'filter2'], 'after' => ['filter3', 'filter4']]);

so, in Laravel 5 you should be able to use this:

Route::get('/', ['uses' => 'HomeController@index', 'middleware' => 'filter1|filter2|filter3|filter4']);

or

Route::get('/', ['uses' => 'HomeController@index', 'middleware' => ['filter1', 'filter2', 'filter3', 'filter4']]);
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.