app/Http/Controllers/admin/CustomerController.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)
    {
         $data = CustomerModel::findorFail($id);
            $post = request()->all();
               $data->type = $request->type;
               $data->date = $request->date;
               $data->cli_name = $request->cli_name;
               $data->con_name = $request->con_name;
               $data->estimated = $request->estimated;
               $data->cost = $request->cost; 
               $data->content = $request->content; 
               $data->degree = $request->degree;
               $data->opinion = $request->opinion; 
               $data->remark = $request->remark; 
               $bool = $data->save();
            if($data){
                return redirect('admin/customer/index');
            }
    }
public function update ( Request $ request , $ id ) { $ data = CustomerModel :: findorFail ( $ id ) ; $ post = request ( ) -> all ( ) ; $ data -> type = $ request -> type ; $ data -> date = $ request -> date ; $ data -> cli_name = $ request -> cli_name ; $ data -> con_name = $ request -> con_name ; $ data -> estimated = $ request -> estimated ; $ data -> cost = $ request -> cost ; $ data -> content = $ request -> content ; $ data -> degree = $ request -> degree ; $ data -> opinion = $ request -> opinion ; $ data -> remark = $ request -> remark ; $ bool = $ data -> save ( ) ; if ( $ data ) { return redirect ( 'admin/customer/index' ) ; } }
Update the specified resource in storage.
Update the specified resource in storage .
//dd($data);exit; //dd($post);exit; // dd($bool);exit;