'web' => [
// Другие посредники...
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
],
Trying to use where clauses (like in the example below) won't work when eager loading the relationship because at the time the relationship is processed $this->team_id is null.