app/Http/Controllers/KecamatanController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Kecamatan  $kecamatan
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $idkab, $idkec)
    {
        $data = Kecamatan::whereUuid($idkec)->firstOrFail();
        $data->label = $request->label;
        $data->save();
        return redirect()->route('kabupaten.kecamatan.index', $idkab)->with('success', 'data successfully updated');
    }
public function update ( Request $ request , $ idkab , $ idkec ) { $ data = Kecamatan :: whereUuid ( $ idkec ) -> firstOrFail ( ) ; $ data -> label = $ request -> label ; $ data -> save ( ) ; return redirect ( ) -> route ( 'kabupaten.kecamatan.index' , $ idkab ) -> with ( 'success' , 'data successfully updated' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .