> */ public function rules(): array { $allowedMimes = [ ...MediaType::Image->allowedMimeTypes(), ...MediaType::Video->allowedMimeTypes(), ...MediaType::Document->allowedMimeTypes(), ]; return [ // Use the largest per-type cap as the upper bound; per-type // and per-post enforcement happens in the controller. 'media' => [ 'required', 'file', 'max:'.MediaType::Video->maxSizeInKb(), 'mimetypes:'.implode(',', $allowedMimes), ], ]; } }