mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Use null coalescence
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
e372527d13
commit
c57f1f9d7d
|
@ -24,7 +24,7 @@ class UsersTransformer
|
||||||
|
|
||||||
$array = [
|
$array = [
|
||||||
'id' => (int) $user->id,
|
'id' => (int) $user->id,
|
||||||
'avatar' => e($user->present()->gravatar),
|
'avatar' => e($user->present()->gravatar) ?? null,
|
||||||
'name' => e($user->getFullNameAttribute()),
|
'name' => e($user->getFullNameAttribute()),
|
||||||
'first_name' => e($user->first_name),
|
'first_name' => e($user->first_name),
|
||||||
'last_name' => e($user->last_name),
|
'last_name' => e($user->last_name),
|
||||||
|
|
Loading…
Reference in a new issue