add staff remove & staff invite test

This commit is contained in:
2020-08-15 12:13:09 +02:00
parent 0b9229d966
commit 92d83d9f9a
7 changed files with 111 additions and 11 deletions

View File

@@ -28,7 +28,7 @@ class User extends JsonResource
'last_login' => optional($this->login_at)->diffForHumans(),
'is_admin' => $this->isAdmin(),
'is_staff' => $this->whenPivotLoaded('event_guest', function() {
return $this->pivot->is_staff;
return (int) $this->pivot->is_staff;
}),
],
],