1
0
Files

35 lines
983 B
PHP

<?php
namespace App\Http\Requests\Ticket;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class UpdateTicketRequest 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.
*
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'ticket_type_id' => 'sometimes|integer',
'customer_id' => 'nullable|integer',
'title' => 'sometimes|string|max:255',
'description' => 'nullable|string',
'priority' => 'sometimes|in:low,medium,high,critical',
'status' => 'sometimes|in:draft,open,approved,assigned,progress,pending,resolved,closed,cancelled,rejected'
];
}
}