<?php

namespace App\Models;

use App\Traits\ModelTrait;
use Bican\Roles\Models\Permission as Model;

class Permission extends Model
{
	use ModelTrait;

	protected $fillable = ['name', 'slug', 'description', 'model', 'menus_id'];

    public function menus()
    {
        return $this->belongsTo(\App\Models\Menu::class);
    }

    public function setSlugAttribute($value)
    {
        $this->attributes['slug'] = trim($value);
    }
}
