27 lines
493 B
PHP
27 lines
493 B
PHP
<?php
|
|
|
|
namespace App\Repositories\Core\Auth;
|
|
|
|
use App\Models\Core\Auth\Permission;
|
|
use App\Traits\Model\Basic;
|
|
|
|
class Permissions
|
|
{
|
|
use Basic;
|
|
|
|
public static function getModules()
|
|
{
|
|
return Permission::select('module')->distinct('module')->get()->pluck('module');
|
|
}
|
|
|
|
public static function getByName($name)
|
|
{
|
|
return Permission::where('name', $name)->first();
|
|
}
|
|
|
|
public static function getModel()
|
|
{
|
|
return Permission::query();
|
|
}
|
|
}
|