vendredi 17 novembre 2017

What is Closure in Laravel?

Hello i'm working as laravel Beginner and i saw one function in middlewere and the function is below :

public function handle($request, Closure $next, $guard = null)
{
    if (Auth::guard($guard)->check())
    {
       return redirect('/home');
    } 

    return $next($request);
}

What is Closure and what does it do ?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2hGPikL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire