app/Http/Controllers/Admin/PriceController.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)
    {
        $name = $request->input('name');
        $sub_name = $request->input('sub_name');
        $price = $request->input('price');
        $list1 = $request->input('list1');
        $list2 = $request->input('list2');
        $list3 = $request->input('list3');
        $list4 = $request->input('list4');
        $list5 = $request->input('list5');
            price::find($id)->update([
            'price_name' => $name,
            'price_sub_name' => $sub_name,
            'price_nominal' => $price,
            'price_list1' => $list1,
            'price_list2' => $list2,
            'price_list3' => $list3,
            'price_list4' => $list4,
            'price_list5' => $list5,
            ]);
            return redirect()->to("adminpages/price");
    }
public function update ( Request $ request , $ id ) { $ name = $ request -> input ( 'name' ) ; $ sub_name = $ request -> input ( 'sub_name' ) ; $ price = $ request -> input ( 'price' ) ; $ list1 = $ request -> input ( 'list1' ) ; $ list2 = $ request -> input ( 'list2' ) ; $ list3 = $ request -> input ( 'list3' ) ; $ list4 = $ request -> input ( 'list4' ) ; $ list5 = $ request -> input ( 'list5' ) ; price :: find ( $ id ) -> update ( [ 'price_name' => $ name , 'price_sub_name' => $ sub_name , 'price_nominal' => $ price , 'price_list1' => $ list1 , 'price_list2' => $ list2 , 'price_list3' => $ list3 , 'price_list4' => $ list4 , 'price_list5' => $ list5 , ] ) ; return redirect ( ) -> to ( " adminpages/price " ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// $title = $request->input('title');