git add .
git commit "Implement user registration"
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -23,12 +24,15 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property int $status
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @property Collection|Role[] $roles
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Admin extends Model
|
||||
{
|
||||
protected $table = 'admins';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'status' => 'int'
|
||||
@@ -48,4 +52,9 @@ class Admin extends Model
|
||||
'image',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function roles()
|
||||
{
|
||||
return $this->belongsToMany(Role::class, 'admin_roles');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user