28 lines
591 B
PHP
28 lines
591 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Api\V1;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
final class ImportFromEventRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/** @return array<string, mixed> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'source_event_id' => [
|
|
'required', 'ulid',
|
|
Rule::exists('events', 'id')->where('organisation_id', $this->route('event')->organisation_id),
|
|
],
|
|
];
|
|
}
|
|
}
|