backend/app/models/User.php
2024-07-24 14:07:45 +03:00

25 lines
595 B
PHP

<?php
namespace app\models;
use Illuminate\Database\Eloquent\Model;
/**
* @property string $username
* @property string $email
* @property string $password_hash
*/
class User extends Model {
protected $table = 'user';
protected $fillable = ['username', 'email', 'password_hash', 'role'];
protected array $dates = ['deleted at'];
public static function labels(): array
{
return [
'username' => 'Логин',
'email' => 'Email',
'created_at' => 'Создан',
'updated_at' => 'Обновлен'
];
}
}