bearer middleware

This commit is contained in:
2024-10-22 11:09:35 +03:00
parent 215d2b1290
commit 7ccf0957bf
14 changed files with 141 additions and 9 deletions

View File

@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Model;
* @property string $username
* @property string $email
* @property string $password_hash
* @property string $access_token
* @property string $access_token_expires_at
* @method static find($id)
*/
class User extends Model {
@ -15,7 +17,7 @@ class User extends Model {
const ADMIN_USER_ROLE = 9;
protected $table = 'user';
protected $fillable = ['username', 'email', 'password_hash', 'role'];
protected $fillable = ['username', 'email', 'password_hash', 'role', 'access_token', 'access_token_expires_at'];
protected array $dates = ['deleted at'];
public static function labels(): array
@ -24,7 +26,9 @@ class User extends Model {
'username' => 'Логин',
'email' => 'Email',
'created_at' => 'Создан',
'updated_at' => 'Обновлен'
'updated_at' => 'Обновлен',
'access_token' => 'Token',
'access_token_expires_at' => 'Token expires at',
];
}
}