User guard for null
This commit is contained in:
parent
14d0e99a37
commit
ec6cb42bfd
@ -72,6 +72,10 @@ class UserService extends Service
|
||||
->with(['airline', 'bids', 'rank'])
|
||||
->find($user_id);
|
||||
|
||||
if (empty($user)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($user->state === UserState::DELETED) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user