first commit
This commit is contained in:
17
app/common/model/AdminUser.php
Normal file
17
app/common/model/AdminUser.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace app\common\model;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AdminUser extends Model
|
||||
{
|
||||
protected $table = 'admin_users';
|
||||
protected $guarded = [];
|
||||
protected $hidden = ['password_hash', 'updated_at'];
|
||||
|
||||
public function roles()
|
||||
{
|
||||
return $this->belongsToMany(Role::class, 'admin_roles', 'admin_id', 'role_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user