Here is the middleware code
public function handle($request, Closure $next) { $user = Auth::user(); if (!$user->team->id) { throw new Bi