db: add User has one AdminRole relation

This commit is contained in:
Matthew Penner 2021-01-19 18:51:29 -07:00
parent 1e61fd161c
commit e01d859b53
5 changed files with 16 additions and 8 deletions

View file

@ -44,7 +44,7 @@ class UserTransformer extends BaseTransformer
'root_admin' => (bool) $model->root_admin,
'2fa' => (bool) $model->use_totp,
'avatar_url' => $model->avatarURL(),
'role_name' => $model->roleName(),
'role_name' => $model->adminRoleName(),
'created_at' => $this->formatTimestamp($model->created_at),
'updated_at' => $this->formatTimestamp($model->updated_at),
];