Answers for "pass in value in route group middle ware"

0

pass in value in route group middle ware

Route::group(['middleware' => 'checkUserLevel:some_value_of_level'], function () {
            // my routes
        });
Posted by: Guest on September-03-2021
0

pass in value in route group middle ware

public function handle($request, Closure $next, $level)
{
    $user = Auth::user();
    if ($user->level > $level) {
        return redirect('testUrl');
    }

    return $next($request);
}
Posted by: Guest on September-03-2021

Code answers related to "pass in value in route group middle ware"

Code answers related to "Objective-C"

Browse Popular Code Answers by Language