25 lines
696 B
PHP
25 lines
696 B
PHP
<?php
|
|
|
|
namespace App\Domains\Ticketing\Desfile\Requests;
|
|
|
|
use App\Domains\Ticketing\Desfile\Enums\EntryReservationPaymentType;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class IndexEntryReservationsRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user()?->tenant_codigo === 'desfile_pura_tendencia';
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'tipo_pago' => ['sometimes', 'nullable', Rule::enum(EntryReservationPaymentType::class)],
|
|
'page' => ['sometimes', 'integer', 'min:1'],
|
|
'per_page' => ['sometimes', 'integer', 'min:1', 'max:100'],
|
|
];
|
|
}
|
|
}
|