Laravel se a solicitação tiver
if ($request->has('name')) {
//
}
MrDracoula
if ($request->has('name')) {
//
}
public function rules(): array
{
return [
'ticket_category_id' => 'required|integer|exists:ticket_categories,id',
'department_id' => 'required|integer|exists:departments,id'
];
}