app->bind('plugins', 'App\Services\PluginManager'); $bootstrappers = $this->app->make('plugins')->getEnabledBootstrappers(); foreach ($bootstrappers as $file) { // bootstraper is a closure $bootstrapper = require $file; $this->app->call($bootstrapper); } } }