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
+2
View File
@@ -35,6 +35,8 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
global $plugin;
$plugin->start();
// JsonResource::withoutWrapping(); // JsonResource::withoutWrapping();
DB::connection(config('database.default'))->enableQueryLog(); DB::connection(config('database.default'))->enableQueryLog();
+1
View File
@@ -52,3 +52,4 @@ ignore_user_abort(1);
$hook = new \Nexus\Plugin\Hook(); $hook = new \Nexus\Plugin\Hook();
$plugin = new \Nexus\Plugin\Plugin(); $plugin = new \Nexus\Plugin\Plugin();
$plugin->start();
+6 -1
View File
@@ -7,7 +7,12 @@ class Plugin
private static array $plugins = []; private static array $plugins = [];
public function __construct() // public function __construct()
// {
// $this->start();
// }
public function start(): void
{ {
$this->loadProviders(); $this->loadProviders();
$this->bootPlugins(); $this->bootPlugins();