src/Http/Middleware/Authorize.php
public function handle($request, Closure $next)
    {
        $this->request = $request;

        $this->setPermissionKey();

        if(Gate::denies('hasPermission', $this->permissionKey)) {
            $this->deny();
        }

        return $next($request);
    }
public function handle($request, Closure $next)
    {
        $this->request = $request;

        $this->setPermissionKey();

        if(Gate::denies('hasPermission', $this->permissionKey)) {
            $this->deny();
        }

        return $next($request);
    }
Handle an incoming request.

@param  \Illuminate\Http\Request  $request
@param  \Closure  $next
@return mixed