Skip to content

Commit

Permalink
Merge pull request #144 from asundust/master
Browse files Browse the repository at this point in the history
修正动态API功能检索所有模型的时候检索到抽象类型
  • Loading branch information
slowlyo authored Aug 6, 2024
2 parents fb7938f + 943083c commit 29d7f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Services/AdminRelationshipService.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function allModels()
->keys()
->filter(fn($item) => str_contains($item, 'Models\\'))
->filter(fn($item) => @class_exists($item))
->filter(fn($item) => (new \ReflectionClass($item))->isSubclassOf(Model::class))
->filter(fn($item) => (new \ReflectionClass($item))->isSubclassOf(Model::class) && !(new \ReflectionClass($item))->isAbstract())
->merge($modelDirClass)
->unique()
->filter(fn($item) => in_array(app($item)->getTable(), $tables))
Expand Down

0 comments on commit 29d7f7b

Please sign in to comment.