*/
public function buildJointPermissionsForEntity(Entity $entity)
{
- $roles = $this->role->with('jointPermissions')->get();
+ $roles = $this->role->get();
$entities = collect([$entity]);
if ($entity->isA('book')) {
*/
public function buildJointPermissionsForEntities(Collection $entities)
{
- $roles = $this->role->with('jointPermissions')->get();
+ $roles = $this->role->get();
$this->deleteManyJointPermissionsForEntities($entities);
$this->createManyJointPermissions($entities, $roles);
}
});
});
});
+ $this->clean();
return $q;
}