This commit is contained in:
2024-08-06 13:11:24 +03:00
commit 1316f68469
9 changed files with 2270 additions and 0 deletions

27
src/models/User.php Normal file
View File

@ -0,0 +1,27 @@
<?php
namespace Itguild\EloquentTable\models;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @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' => 'Обновлен'
];
}
}