refactor(backend): reorganize domains into Core, Commerce, Ticketing and Shared
This commit is contained in:
27
app/Shared/Integration/Requests/UpdateIntegrationRequest.php
Normal file
27
app/Shared/Integration/Requests/UpdateIntegrationRequest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Integration\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateIntegrationRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
$integration = $this->route('integration');
|
||||
|
||||
return [
|
||||
'name' => ['sometimes', 'required', 'string', 'max:255'],
|
||||
'url' => ['nullable', 'url', 'max:255'],
|
||||
'integration_data_schema' => ['nullable', 'array'],
|
||||
'requires_configuration' => ['sometimes', 'boolean'],
|
||||
'integration_code' => ['sometimes', 'required', 'string', Rule::in([$integration->integration_code])],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user