2025-01-21 01:57:54 -05:00
|
|
|
<?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;
|
2025-01-25 22:41:53 -05:00
|
|
|
use Illuminate\Support\Facades\Log;
|
2025-01-21 01:57:54 -05:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|