mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-02 05:10:59 +00:00
* fix(modules): recover from missing runtime files * feat(modules): add safe uninstall lifecycle * build(deps): lock module SDK 3.2.0 * test(modules): expect SDK 3.2 scaffold constraint
30 lines
675 B
PHP
30 lines
675 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class UninstallMarketplaceModuleRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/** @return array<string, list<string|\Stringable>> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'remove_data' => ['required', 'boolean'],
|
|
'confirmation' => [
|
|
'nullable',
|
|
'string',
|
|
'max:100',
|
|
'required_if:remove_data,true',
|
|
Rule::in([(string) $this->route('module')]),
|
|
],
|
|
];
|
|
}
|
|
}
|