* wip

* fix plugin uninstall

* marketplace
This commit is contained in:
Saeed Vaziry
2025-06-19 14:07:15 +02:00
committed by GitHub
parent 131b828807
commit 342a3aa4c6
35 changed files with 1973 additions and 934 deletions

View File

@ -6,6 +6,7 @@
use App\Helpers\Notifier;
use App\Helpers\SSH;
use App\Models\PersonalAccessToken;
use App\Plugins\Plugins;
use Illuminate\Http\Resources\Json\ResourceCollection;
use Illuminate\Support\ServiceProvider;
use Laravel\Fortify\Fortify;
@ -29,6 +30,7 @@ public function boot(): void
$this->app->bind('ssh', fn (): SSH => new SSH);
$this->app->bind('notifier', fn (): Notifier => new Notifier);
$this->app->bind('ftp', fn (): FTP => new FTP);
$this->app->bind('plugins', fn (): Plugins => new Plugins);
Sanctum::usePersonalAccessTokenModel(PersonalAccessToken::class);
}

View 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,
]);
}
}
}

View File

@ -5,11 +5,7 @@
use App\DTOs\DynamicField;
use App\DTOs\DynamicForm;
use App\Enums\LoadBalancerMethod;
use App\Plugins\RegisterSiteFeature;
use App\Plugins\RegisterSiteFeatureAction;
use App\Plugins\RegisterSiteType;
use App\SiteFeatures\LaravelOctane\Disable;
use App\SiteFeatures\LaravelOctane\Enable;
use App\SiteTypes\Laravel;
use App\SiteTypes\LoadBalancer;
use App\SiteTypes\PHPBlank;
@ -114,29 +110,6 @@ private function laravel(): void
->default(false),
]))
->register();
RegisterSiteFeature::make('laravel', 'laravel-octane')
->label('Laravel Octane')
->description('Enable Laravel Octane for this site')
->register();
RegisterSiteFeatureAction::make('laravel', 'laravel-octane', 'enable')
->label('Enable')
->form(DynamicForm::make([
DynamicField::make('alert')
->alert()
->label('Alert')
->description('Make sure you have already set the `OCTANE_SERVER` in your `.env` file'),
DynamicField::make('port')
->text()
->label('Octane Port')
->default(8000)
->description('The port on which Laravel Octane will run.'),
]))
->handler(Enable::class)
->register();
RegisterSiteFeatureAction::make('laravel', 'laravel-octane', 'disable')
->label('Disable')
->handler(Disable::class)
->register();
}
public function loadBalancer(): void