Skip to content

Commit

Permalink
change plugin start
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Aug 23, 2024
1 parent b8c044d commit c7c8542
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public function register()
*/
public function boot()
{
global $plugin;
$plugin->start();
// JsonResource::withoutWrapping();
DB::connection(config('database.default'))->enableQueryLog();

Expand Down
1 change: 1 addition & 0 deletions include/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@

$hook = new \Nexus\Plugin\Hook();
$plugin = new \Nexus\Plugin\Plugin();
$plugin->start();
7 changes: 6 additions & 1 deletion nexus/Plugin/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c7c8542

Please sign in to comment.