2024-07-03 14:41:15 +03:00
|
|
|
<?php
|
2024-07-03 15:15:59 +03:00
|
|
|
namespace app\models;
|
2024-07-10 14:39:37 +03:00
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2024-07-03 14:41:15 +03:00
|
|
|
|
|
|
|
class User extends Model {
|
2024-07-10 12:42:50 +03:00
|
|
|
protected $table = 'user';
|
2024-07-10 14:39:37 +03:00
|
|
|
protected $fillable = ['username', 'email', 'password_hash', 'role'];
|
2024-07-12 13:46:44 +03:00
|
|
|
protected array $dates = ['deleted at'];
|
|
|
|
|
|
|
|
public static function labels(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'username' => 'Логин',
|
|
|
|
'email' => 'Email',
|
|
|
|
'created_at' => 'Создан',
|
|
|
|
'updated_at' => 'Обновлен'
|
|
|
|
];
|
|
|
|
}
|
2024-07-03 14:41:15 +03:00
|
|
|
}
|