mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-21 02:39:10 -04:00
3.2.3
This commit is contained in:
18
app/Rank.php
18
app/Rank.php
@@ -10,4 +10,22 @@ class Rank extends Model
|
||||
{
|
||||
return collect(json_decode($this->permissions,true));
|
||||
}
|
||||
|
||||
public function permission($permission)
|
||||
{
|
||||
foreach ($this->permissions() as $perm => $value)
|
||||
{
|
||||
if ($permission == $perm)
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function p($perm)
|
||||
{
|
||||
return $this->permission($perm);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user