Skip to content

Commit

Permalink
Merge pull request vyuldashev#106 from theimerj/master
Browse files Browse the repository at this point in the history
FIx issue vyuldashev#105
  • Loading branch information
vyuldashev authored Dec 11, 2019
2 parents 1b24deb + aebbc4d commit f4c7f5b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/PermissionBooleanGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ public function __construct($name, $attribute = null, callable $resolveCallback
$name,
$attribute,
$resolveCallback ?? static function (Collection $permissions) {
return $permissions->mapWithKeys(function(PermissionModel $permission) {
return $permissions->mapWithKeys(function (PermissionModel $permission) {
return [$permission->name => true];
});
}
);

$this->options(static function () {
$permissionClass = app(PermissionRegistrar::class)->getPermissionClass();
$permissionClass = app(PermissionRegistrar::class)->getPermissionClass();

return $permissionClass::get()->pluck('name', 'name')->toArray();
});
$options = $permissionClass::get()->pluck('name', 'name')->toArray();

$this->options($options);
}

/**
Expand All @@ -38,7 +38,7 @@ public function __construct($name, $attribute = null, callable $resolveCallback
*/
protected function fillAttributeFromRequest(NovaRequest $request, $requestAttribute, $model, $attribute)
{
if (!$request->exists($requestAttribute)) {
if (! $request->exists($requestAttribute)) {
return;
}

Expand Down

0 comments on commit f4c7f5b

Please sign in to comment.