Answers for "how to pass value on middeware using route group"

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
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

Code answers related to "how to pass value on middeware using route group"

Code answers related to "Objective-C"

Browse Popular Code Answers by Language