app/Http/Controllers/OrderController.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)
    {
        $order = Order::findorFail($id);
        $order->address2 = $request->address2;
        $order->note = $request->note;
        $order->order_status_id = $request->order_status_id;
        $order->save();
        return redirect()->back()->with('msg', 'Cập nhật đơn hàng thành công');
    }
public function update ( Request $ request , $ id ) { $ order = Order :: findorFail ( $ id ) ; $ order -> address2 = $ request -> address2 ; $ order -> note = $ request -> note ; $ order -> order_status_id = $ request -> order_status_id ; $ order -> save ( ) ; return redirect ( ) -> back ( ) -> with ( 'msg' , 'Cập nhật đơn hàng thành công'); }
Update the specified resource in storage.
Update the specified resource in storage .