change plugin start

This commit is contained in:
xiaomlove
2024-08-24 06:49:55 +08:00
parent b8c044d546
commit c7c85422f1
3 changed files with 9 additions and 1 deletions

View File

@@ -35,6 +35,8 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
global $plugin;
$plugin->start();
// JsonResource::withoutWrapping();
DB::connection(config('database.default'))->enableQueryLog();

View File

@@ -52,3 +52,4 @@ ignore_user_abort(1);
$hook = new \Nexus\Plugin\Hook();
$plugin = new \Nexus\Plugin\Plugin();
$plugin->start();

View File

@@ -7,7 +7,12 @@ class Plugin
private static array $plugins = [];
public function __construct()
// public function __construct()
// {
// $this->start();
// }
public function start(): void
{
$this->loadProviders();
$this->bootPlugins();