isMethod('POST')) { return [ '' => 'required', 'title' => 'required', 'image' => 'required', ]; } // Validation rule for update request. if ($request->isMethod('PUT') || $request->isMethod('PATCH')) { return [ '' => 'required', 'title' => 'required', 'image' => 'required', ]; } // Default validation rule. return [ ]; } }