Skip to content

Commit

Permalink
Added support to create both filament resources and other models (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: Tharinda Rodrigo <[email protected]>
  • Loading branch information
tharindarodrigo and Tharinda Rodrigo authored Mar 1, 2023
1 parent eedd820 commit 4164998
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Commands/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,8 @@ public function getModels(): array

foreach ($resources as $resource) {
$resourceClass = $resource->getFilenameWithoutExtension();
$models[] = class_basename(app('App\Filament\Resources\\' . $resourceClass)->getModel());
$models[] = new \ReflectionClass(app('App\Filament\Resources\\' . $resourceClass)->getModel());
}

return $models;
}

foreach ($this->config['model_directories'] as $modelDirectory => $modelNamespace) {
Expand Down

0 comments on commit 4164998

Please sign in to comment.