I have in UsersController.php
$this->beforeFilter('permission:administration');
and in my filers.php ( this is for larval 3 I want to change it to larval 4.2 equivalent)
Route::filter('permission', function($permission)
{
if(!Auth::user()->permission($permission)) return App::abort(500);
});
This code is from Laravel 3 and I am trying to make the same thing for Laravel 4.2 I am getting there folioing error :
Object of class Illuminate\Routing\Route could not be converted to string
How could I fix this , please help