20 lines
771 B
PHP
20 lines
771 B
PHP
<?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');
|
|
}
|
|
}
|