Files
nyone/app/Http/Requests/StoreSupportMessageRequest.php

26 lines
594 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreSupportMessageRequest extends FormRequest
{
public function authorize(): bool
{
return $this->user() !== null;
}
/**
* @return array<string, array<int, string>>
*/
public function rules(): array
{
return [
'body' => ['required', 'string', 'max:2000'],
'attachments' => ['nullable', 'array', 'max:3'],
'attachments.*' => ['file', 'max:10240', 'mimes:jpg,jpeg,png,webp,gif,pdf,txt,log,json,zip'],
];
}
}