SystemPermissionFilter.php
638 Bytes
<?php
namespace App\ModelFilters;
use App\Support\ModelFilter;
use Arr;
class SystemPermissionFilter extends ModelFilter
{
/**
* @param string $guard
* @return void
*/
public function guard(string $guard): void
{
$this->where('guard', $guard);
}
/**
* @param string $type
* @return void
*/
public function type(string $type): void
{
$this->where('type', $type);
}
/**
* @param int|array $status
* @return void
*/
public function isRoute(int|array $status): void
{
$this->whereIn('is_route', Arr::wrap($status));
}
}