mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-02-11 03:08:13 -05:00
27 lines
628 B
PHP
27 lines
628 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Plugin;
|
|
use App\Services\Plugin\PluginManager;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class PluginServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
$this->app->scoped(PluginManager::class, function ($app) {
|
|
return new PluginManager();
|
|
});
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
if (!file_exists(base_path('plugins'))) {
|
|
mkdir(base_path('plugins'), 0755, true);
|
|
}
|
|
}
|
|
} |