mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 23:12:35 +00:00
2.x
This commit is contained in:
27
app/Web/Pages/Settings/ServerProviders/Actions/Edit.php
Normal file
27
app/Web/Pages/Settings/ServerProviders/Actions/Edit.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Web\Pages\Settings\ServerProviders\Actions;
|
||||
|
||||
use App\Actions\ServerProvider\EditServerProvider;
|
||||
use App\Models\ServerProvider;
|
||||
use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
|
||||
class Edit
|
||||
{
|
||||
public static function form(): array
|
||||
{
|
||||
return [
|
||||
TextInput::make('name')
|
||||
->label('Name')
|
||||
->rules(EditServerProvider::rules()['name']),
|
||||
Checkbox::make('global')
|
||||
->label('Is Global (Accessible in all projects)'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function action(ServerProvider $provider, array $data): void
|
||||
{
|
||||
app(EditServerProvider::class)->edit($provider, auth()->user(), $data);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user