isMethod('POST')) { return [ 'name_of_pet' => 'required', 'lost_date' => 'required', 'color_of_pet' => 'required', 'age_of_pet' => 'required', 'character' => 'required', 'characteristics' => 'required', ]; } // Validation rule for update request. if ($request->isMethod('PUT') || $request->isMethod('PATCH')) { return [ 'name_of_pet' => 'required', 'lost_date' => 'required', 'color_of_pet' => 'required', 'age_of_pet' => 'required', 'character' => 'required', 'characteristics' => 'required', ]; } // Default validation rule. return [ ]; } }