backend/app/models/User.php
2024-07-24 16:31:07 +03:00

27 lines
661 B
PHP

<?php
namespace app\models;
use Illuminate\Database\Eloquent\Model;
/**
* @property string $username
* @property string $email
* @property string $password_hash
* @method static where(int[] $array)
* @method static find($id)
*/
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' => 'Обновлен'
];
}
}