Files
hatame.andarza09/app/Models/Admin.php
T
hatame 14684d5537 git add .
git commit "create admin panel layout structure"
2026-08-18 09:04:00 +03:30

63 lines
1.0 KiB
PHP

<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User;
/**
* Class Admin
*
* @property int $id
* @property string $first_name
* @property string $last_name
* @property string $username
* @property string $email
* @property string $mobile
* @property string $password
* @property string|null $image
* @property int $status
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property Collection|Role[] $roles
*
* @package App\Models
*/
class Admin extends User
{
protected $table = 'admins';
public static $snakeAttributes = false;
protected $casts = [
'status' => 'int'
];
protected $hidden = [
'password'
];
protected $fillable = [
'first_name',
'last_name',
'username',
'email',
'mobile',
'password',
'image',
'status'
];
public function roles()
{
return $this->belongsToMany(Role::class, 'admin_roles');
}
}