pluginManager = $pluginManager; } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle(Request $request, Closure $next) { // This single method call handles loading and booting all enabled plugins. // It's safe to call multiple times, as it will only run once per request. $this->pluginManager->initializeEnabledPlugins(); return $next($request); } }