public function handle($request, Closure $next, $guard = null) { $owner = Auth::user()->owner; if (!$owner instanceof ModelTeacher) { return response('Unauthorized.', 401); } return $next($request); }