app/Http/Controllers/ProdiController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $prodi = Prodi::where('prodi_id', $id)->update(['prodi_nama' => $request->nama]);
        if ($prodi) {
            return redirect()->route('prodi')->with('success', 'Data Berhasil Diubah');
        } else {
            return redirect()->route('prodi')->with('error', 'Data Gagal Diubah');
        }
    }
public function update ( Request $ request , $ id ) { $ prodi = Prodi :: where ( 'prodi_id' , $ id ) -> update ( [ 'prodi_nama' => $ request -> nama ] ) ; if ( $ prodi ) { return redirect ( ) -> route ( 'prodi' ) -> with ( 'success' , 'Data Berhasil Diubah' ) ; } else { return redirect ( ) -> route ( 'prodi' ) -> with ( 'error' , 'Data Gagal Diubah' ) ; } }
Update the specified resource in storage.
Update the specified resource in storage .