first commit
This commit is contained in:
19
backend/app/Models/Auth/Roles.php
Normal file
19
backend/app/Models/Auth/Roles.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace App\Models\Auth;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Roles extends Model{
|
||||
|
||||
public function permissions(){
|
||||
return $this->belongsToMany(Permissions::class, RoleHasPermissions::class, 'permission_id', 'role_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user