ldc-gen-game-web/app/Http/Requests/Bo/UpdateChangeOrderRequest.php
2026-10-20 12:27:49 +02:00

38 lines
746 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests\Bo;
use Illuminate\Foundation\Http\FormRequest;
class UpdateChangeOrderRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return auth()->check();
}
/**
* Prepare the data for validation.
*/
protected function prepareForValidation(): void
{
$this->merge([
'direction' => $this->route('direction') === 'up',
]);
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'direction' => 'required|boolean',
];
}
}