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