From 943083c97c12067fa66db5c40d4ee0f68216b1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A1=B5=E4=B8=96=E4=B8=8D=E5=86=8D?= Date: Tue, 6 Aug 2024 09:15:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=8A=A8=E6=80=81API?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=A3=80=E7=B4=A2=E6=89=80=E6=9C=89=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E7=9A=84=E6=97=B6=E5=80=99=E6=A3=80=E7=B4=A2=E5=88=B0?= =?UTF-8?q?=E6=8A=BD=E8=B1=A1=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 筛选中加入去除抽象类的检查 --- src/Services/AdminRelationshipService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/AdminRelationshipService.php b/src/Services/AdminRelationshipService.php index 74966042..b88bb71e 100644 --- a/src/Services/AdminRelationshipService.php +++ b/src/Services/AdminRelationshipService.php @@ -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))