<?php

namespace App\Models\SecurityManagement;

use App\Models\Traits\HasDates;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Spatie\Permission\Models\Permission as SpatiePermission;

class Permission extends SpatiePermission {
    use HasFactory,HasDates;

    protected $table = "security_mgt__roles";
    protected $hidden = ['pivot'];
    protected $guarded = ['id'];

  //  protected  $guard_name = 'resources';

    //protected static function booted(){

       // static::addGlobalScope(new PermissionGlobalScope);
   // }



    public function scopeAdmin($query){
        return $query->where('guard_name',"admin");
    }

}
