app/Http/Controllers/Admin/ContactController.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)
    {
        $address = $request->input('address');
        $kode_pos = $request->input('kode_pos');
        $email = $request->input('email');
        $telpon = $request->input('telpon');
        $opening = $request->input('opening');
        $close_time = $request->input('close_time');
        $title = $request->input('title');
        $sub_title = $request->input('sub_title');
            contact::find($id)->update([
                'contact_title' => $title,
                'contact_sub_title' => $sub_title,
                'contact_address' => $address,
                'contact_kode_pos' => $kode_pos,
                'contact_email' => $email,
                'contact_tlpn' => $telpon,
                'contact_opening' => $opening,
                'contact_close' => $close_time,
            ]);
            return redirect()->to("adminpages/contact");
    }
public function update ( Request $ request , $ id ) { $ address = $ request -> input ( 'address' ) ; $ kode_pos = $ request -> input ( 'kode_pos' ) ; $ email = $ request -> input ( 'email' ) ; $ telpon = $ request -> input ( 'telpon' ) ; $ opening = $ request -> input ( 'opening' ) ; $ close_time = $ request -> input ( 'close_time' ) ; $ title = $ request -> input ( 'title' ) ; $ sub_title = $ request -> input ( 'sub_title' ) ; contact :: find ( $ id ) -> update ( [ 'contact_title' => $ title , 'contact_sub_title' => $ sub_title , 'contact_address' => $ address , 'contact_kode_pos' => $ kode_pos , 'contact_email' => $ email , 'contact_tlpn' => $ telpon , 'contact_opening' => $ opening , 'contact_close' => $ close_time , ] ) ; return redirect ( ) -> to ( " adminpages/contact " ) ; }
Update the specified resource in storage.
Update the specified resource in storage .