for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanesoft\Auth\Models;
use Arcanedev\LaravelAuth\Models\Permission as BasePermission;
/**
* Class Permission
*
* @package Arcanesoft\Auth\Models
* @author ARCANEDEV <[email protected]>
* @property int|null roles_count
* @mixin \Illuminate\Database\Eloquent\Builder
*/
class Permission extends BasePermission
{
/* -----------------------------------------------------------------
| Traits
| -----------------------------------------------------------------
use Presenters\PermissionPresenter;
| Main Methods
* Get a permission from a hashed id or fail if not found.
* @param string $hashedId
* @return self
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
public static function firstHashedOrFail($hashedId)
return self::withHashedId($hashedId)->firstOrFail();
}
* Get the ids of all permissions.
* @return \Illuminate\Support\Collection
public static function getIds()
return self::query()->orderBy('id')->pluck('id');
orderBy()
Illuminate\Database\Eloquent\Builder
enforceOrderBy()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
| Check Methods
* Check if permission has a group.
* @return bool
public function hasGroup()
return $this->group_id > 0;
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.