<?php

namespace Filanco\Cms\Models;

use Illuminate\Database\Eloquent\Model;
use Filanco\Cms\Facades\Cms;

class Role extends Model
{
    protected $guarded = [];

    public function users()
    {
        return $this->belongsToMany(Cms::modelClass('User'), 'user_roles');
    }

    public function permissions()
    {
        return $this->belongsToMany(Cms::modelClass('Permission'));
    }
}
