mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-06 13:34:50 +08:00
38 lines
728 B
PHP
38 lines
728 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class PluginServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->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);
|
|
}
|
|
}
|
|
}
|