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 ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire