app/Http/Controllers/CommunicationNomenclatureController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\CommunicationNomenclature  $communicationNomenclature
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(CommunicationNomenclatureRequest $request, CommunicationNomenclature $nomenclature)
    {
        $this->validate($request, [
            'equipment_code' => 'required',
            'nomenclature' => 'required',
            'classification' => 'required',
            'commo_category_id' => 'required',
        ]);
        $nomenclature = CommunicationNomenclature::find($nomenclature->id);
        $nomenclature->equipment_code = $request->input('equipment_code');
        $nomenclature->nomenclature = $request->input('nomenclature');
        $nomenclature->classification = $request->input('classification');
        $nomenclature->commo_category_id = $request->input('commo_category_id');
        $nomenclature->save();
        return redirect()->route('c4s nomenclature')->withStatus(__('Nomenclature Successfully Updated.'));
    }
public function update ( CommunicationNomenclatureRequest $ request , CommunicationNomenclature $ nomenclature ) { $ this -> validate ( $ request , [ 'equipment_code' => 'required' , 'nomenclature' => 'required' , 'classification' => 'required' , 'commo_category_id' => 'required' , ] ) ; $ nomenclature = CommunicationNomenclature :: find ( $ nomenclature -> id ) ; $ nomenclature -> equipment_code = $ request -> input ( 'equipment_code' ) ; $ nomenclature -> nomenclature = $ request -> input ( 'nomenclature' ) ; $ nomenclature -> classification = $ request -> input ( 'classification' ) ; $ nomenclature -> commo_category_id = $ request -> input ( 'commo_category_id' ) ; $ nomenclature -> save ( ) ; return redirect ( ) -> route ( 'c4s nomenclature' ) -> withStatus ( __ ( 'Nomenclature Successfully Updated.' ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .