Skip to content

Commit

Permalink
Merge pull request #31 from Althinect/dev
Browse files Browse the repository at this point in the history
Bug fix for seeding Custom Model Permissions
  • Loading branch information
tharindarodrigo authored Mar 1, 2023
2 parents 5ae23a8 + 1df41d2 commit 32f9fd9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Commands/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private function guardNames(): array

private function getCustomModels(): array
{
return $this->getClassNames($this->config['custom_models']);
return $this->getModelReflections($this->config['custom_models']);
}

private function getCustomPermissions(): array
Expand All @@ -204,13 +204,13 @@ private function getCustomPermissions(): array

private function getExcludedModels(): array
{
return $this->getClassNames($this->config['excluded_models']);
return $this->getModelReflections($this->config['excluded_models']);
}

private function getClassNames($array): array
private function getModelReflections($array): array
{
return array_map(function ($classes) {
return class_basename($classes);
return new \ReflectionClass($classes);
}, $array);
}
}

0 comments on commit 32f9fd9

Please sign in to comment.