Support the ongoing development of Laravel.io →
posted 10 years ago
Architecture
Last updated 2 years ago.
0

If it isn't working, try to wrap the resource in a group. It's should do the trick.

Route::group(['before' => 'csrf'], function() {
    Route::resource('foo', 'FooController');
});
Last updated 2 years ago.
0

Thanx, it does the trick, but i was wonder if i could implement the filter into the resources. Cheers.

Last updated 2 years ago.
0

You can specify filters in the controller and you have a greater control over them, applying them to selected functions or http methods, etc.

http://laravel.com/docs/4.2/controllers#controller-filters

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

shahroq shahroq Joined 14 Jun 2014

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.