Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel make:middleware

public function handle($request, Closure $next)
{
    if ($request->user()->type != 'A')
    {
        return redirect('home');
    }

    return $next($request);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel
ADD COMMENT
Topic
Name
1+3 =