app/Http/Controllers/PaymentController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Payment  $payment
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit(Payment $payment)
    {
        $data['previous']     = URL::to('/dashboard');
        $data['active_class'] = 'payments';
        $data['payment']      = $payment;
        $data['programs'] = DB::table('client_programs AS CP')
                            ->join('programs AS P', 'P.id', 'CP.program_id')
                            ->where('CP.client_id', $payment->client_id)->get();
        $data['steps']    = Step::getProgramAllStep($payment->program_id);
        $data['payment_types'] = PaymentType::where('payment_id', $payment->id)
                                  ->where('cheque_verified', '!=', 0)
                                  ->where('online_verified', '!=', 0)
                                  ->where('bkash_salman_verified', '!=', 0)
                                  ->where('bkash_corporate_verified', '!=', 0)
                                  ->where('refund_payment', '!=', 1)
                                  ->get();
        $data['locations'] = [
            'dhaka'      => 'Dhaka', 
            'chittagong' => 'Chittagong',
            'cox_bazar'  => 'Cox\'s bazar',
            'sylhet'     => 'Sylhet',
            'khulna'     => 'Khulna',
            'comilla'    => 'Comilla',
            'noakhali'   => 'Noakhali',
            'rajshahi'   => 'Rajshahi',
            'bagura'   => 'Bagura',
         ];
        return view('payments.edit', $data);
    }
public function edit ( Payment $ payment ) { $ data [ 'previous' ] = URL :: to ( '/dashboard' ) ; $ data [ 'active_class' ] = 'payments' ; $ data [ 'payment' ] = $ payment ; $ data [ 'programs' ] = DB :: table ( 'client_programs AS CP' ) -> join ( 'programs AS P' , 'P.id' , 'CP.program_id' ) -> where ( 'CP.client_id' , $ payment -> client_id ) -> get ( ) ; $ data [ 'steps' ] = Step :: getProgramAllStep ( $ payment -> program_id ) ; $ data [ 'payment_types' ] = PaymentType :: where ( 'payment_id' , $ payment -> id ) -> where ( 'cheque_verified' , '!=' , 0 ) -> where ( 'online_verified' , '!=' , 0 ) -> where ( 'bkash_salman_verified' , '!=' , 0 ) -> where ( 'bkash_corporate_verified' , '!=' , 0 ) -> where ( 'refund_payment' , '!=' , 1 ) -> get ( ) ; $ data [ 'locations' ] = [ 'dhaka' => 'Dhaka' , 'chittagong' => 'Chittagong' , 'cox_bazar' => 'Cox\'s bazar' , 'sylhet' => 'Sylhet' , 'khulna' => 'Khulna' , 'comilla' => 'Comilla' , 'noakhali' => 'Noakhali' , 'rajshahi' => 'Rajshahi' , 'bagura' => 'Bagura' , ] ; return view ( 'payments.edit' , $ data ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .