<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class BaseRequest extends FormRequest
{
    public function validateFile($field): array {
        return $this->hasFile($field)
            ? ['file', 'max:5120']
            : ['nullable', 'string'];
    }
}
