mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 07:22:34 +00:00
30
app/Providers/PluginsServiceProvider.php
Normal file
30
app/Providers/PluginsServiceProvider.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Console\Commands\Plugins\InstallPluginCommand;
|
||||
use App\Console\Commands\Plugins\LoadPluginsCommand;
|
||||
use App\Console\Commands\Plugins\PluginsListCommand;
|
||||
use App\Plugins\Plugins;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class PluginsServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind('plugins', function () {
|
||||
return new Plugins;
|
||||
});
|
||||
}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
if ($this->app->runningInConsole()) {
|
||||
$this->commands([
|
||||
InstallPluginCommand::class,
|
||||
LoadPluginsCommand::class,
|
||||
PluginsListCommand::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user