for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Yajra\Acl\Traits;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Yajra\Acl\Models\Permission;
trait HasRoleAndPermission
{
use HasRole {
HasRole::getPermissions as getRolePermissions;
}
use InteractsWithPermission;
/**
* Get all user permissions slug.
*
* @return array|null
*/
public function getPermissions(): array
$rolePermissions = $this->getRolePermissions();
getRolePermissions()
Yajra\Acl\Traits\HasRoleAndPermission
permissions()
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.
$userPermissions = $this->permissions->pluck('slug')->toArray();
return collect($userPermissions)->merge($rolePermissions)->unique()->toArray();
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.