boot plugin when class exists

This commit is contained in:
xiaomlove
2022-06-08 15:23:34 +08:00
parent cc68a67d71
commit 7e48a7f15d

View File

@@ -34,7 +34,9 @@ class Plugin
$parts = explode('\\', $provider);
if ($parts[0] == 'NexusPlugin') {
$className = str_replace('ServiceProvider', 'Repository', $provider);
call_user_func([new $className, 'boot']);
if (class_exists($className)) {
call_user_func([new $className, 'boot']);
}
}
}
}