<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
// use Modules\Panel\Database\Factories\PermissionFactory;

class Permission extends Model
{
    use HasFactory;

    protected $fillable = [
        'name',
        'slug',
        'menu_id'
    ];

    public function roles()
    {
        return $this->belongsToMany(Role::class);
    }

    public function menu()
    {
        return $this->belongsTo(Menu::class);
    }
}
