Files
InvoiceShelf/app/Http/Requests/ChangeInvoiceStatusRequest.php
2026-08-02 17:02:29 +02:00

35 lines
703 B
PHP

<?php
namespace App\Http\Requests;
use App\Models\Invoice;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class ChangeInvoiceStatusRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'status' => [
'required',
Rule::in([
Invoice::STATUS_SENT,
Invoice::STATUS_COMPLETED,
]),
],
];
}
}