display last login to User Admin

This commit is contained in:
2020-04-12 10:18:54 +02:00
parent 24d27a68ac
commit cb241796cc
3 changed files with 7 additions and 1 deletions

View File

@@ -43,6 +43,8 @@ class User extends Authenticatable
'email_verified_at' => 'datetime',
];
protected $dates = ['login_at'];
public function isAdmin(): bool
{
return $this->role === 2;