birzha-legalizasia/app/Http/Requests/API/MessageRequest.php

33 lines
612 B
PHP
Executable File

<?php
namespace App\Http\Requests\API;
use Illuminate\Foundation\Http\FormRequest;
use App\Rules\TicketRule;
class MessageRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules()
{
return [
'content' => 'required',
'ticket_id' => ['required', new TicketRule]
];
}
}