app/Http/Controllers/Admin/ReceivedPaymentsController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Order  $order
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit(Order $receivedpayment)
    {
        $order_total =  OrderTotal::where('order_id', 'like', $receivedpayment->id)
        ->where('title', 'like', 'Total:')->first();
        $order_subtotal =  OrderTotal::where('order_id', 'like', $receivedpayment->id)
        ->where('title', 'like', 'Sub-Total:')->first();
        $order_card =  OrderTotal::where('order_id', 'like', $receivedpayment->id)
        ->where('title', 'like', '%Credit Card Convenience Fee:%')->first();
        $orderhistories = OrderHistory::where('order_id', 'like', $receivedpayment->id)->get();
        $order_statuses = OrderStatus::all();
        $data = [
            'order'             => $receivedpayment,
            'order_total'       => $order_total,
            'order_subtotal'    => $order_subtotal,
            'order_card'        => $order_card,
            'order_histories'   => $orderhistories,
            'statuses'          => $order_statuses,
        ];
        return view('admin.receivedpayments.edit')->with('data', $data);
    }
public function edit ( Order $ receivedpayment ) { $ order_total = OrderTotal :: where ( 'order_id' , 'like' , $ receivedpayment -> id ) -> where ( 'title' , 'like' , 'Total:' ) -> first ( ) ; $ order_subtotal = OrderTotal :: where ( 'order_id' , 'like' , $ receivedpayment -> id ) -> where ( 'title' , 'like' , 'Sub-Total:' ) -> first ( ) ; $ order_card = OrderTotal :: where ( 'order_id' , 'like' , $ receivedpayment -> id ) -> where ( 'title' , 'like' , '%Credit Card Convenience Fee:%' ) -> first ( ) ; $ orderhistories = OrderHistory :: where ( 'order_id' , 'like' , $ receivedpayment -> id ) -> get ( ) ; $ order_statuses = OrderStatus :: all ( ) ; $ data = [ 'order' => $ receivedpayment , 'order_total' => $ order_total , 'order_subtotal' => $ order_subtotal , 'order_card' => $ order_card , 'order_histories' => $ orderhistories , 'statuses' => $ order_statuses , ] ; return view ( 'admin.receivedpayments.edit' ) -> with ( 'data' , $ data ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .