app/Http/Controllers/KontakController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Kontak  $kontak
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, Kontak $kontak)
    {
        $request->validate([
            'alamat' => 'required',
            'email' => 'required',
            'telepon' => 'required',
            'buka' => 'required',
            'tutup' => 'required'
        ]);
        $input = $request->all();
        $kontak->update($input);
        return redirect()->route('kontaks.index')
                        ->with('success','Kontak Berhasil Diupdate !');
    }
public function update ( Request $ request , Kontak $ kontak ) { $ request -> validate ( [ 'alamat' => 'required' , 'email' => 'required' , 'telepon' => 'required' , 'buka' => 'required' , 'tutup' => 'required' ] ) ; $ input = $ request -> all ( ) ; $ kontak -> update ( $ input ) ; return redirect ( ) -> route ( 'kontaks.index' ) -> with ( 'success' , 'Kontak Berhasil Diupdate !' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .