'required|file', ]; /** * @param Request $request * * @throws \Illuminate\Validation\ValidationException */ public static function validate(Request $request) { \Validator::make($request->all(), static::$rules)->validate(); } public function authorize(): bool { return true; } public function rules(): array { return static::$rules; } }