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