/home/kueuepay/public_html/app/Http/Controllers/User/TransactionLogController.php
<?php

namespace App\Http\Controllers\User;

use App\Constants\PaymentGatewayConst;
use App\Models\Transaction;
use Illuminate\Http\Request;
use App\Http\Helpers\Response;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;

class TransactionLogController extends Controller
{
    /**
     * Method for view transaction log page
     * @return view
     */
    public function cardPayment(){
        $page_title     = "Payment Logs";
        $transactions   = Transaction::with(['card_method'])->where('type',PaymentGatewayConst::CARD_PAYMENT)->auth()->orderBy('id','desc')->get();

        return view('user.sections.transaction.index',compact(
            'page_title',
            'transactions'
        ));
    }
    /**
     * Method for search trasaction data
     */
    public function search(Request $request){
       
        $validator      = Validator::make($request->all(),[
            'text'      => 'required'
        ]);
        if($validator->fails()) {
            $error = ['error' => $validator->errors()];
            return Response::error($error,null,400);
        }

        $validated = $validator->validate();
        
        $transactions    = Transaction::auth()->search($validated['text'])->get();
        return view('user.components.transaction.index',compact('transactions'));
    }
    /**
     * Method for view add money transaction log page
     * @return view
     */
    public function addMoney(){
        $page_title     = "Add Money Logs";

        $transactions   = Transaction::auth()->with(['payment_gateway'])->where('type',PaymentGatewayConst::TYPEADDMONEY)
                            ->orderBy('id','desc')->get();
        return view('user.sections.transaction.index',compact(
            'page_title',
            'transactions'
        ));
    }
    /**
     * Method for view transfer money transaction log page
     * @return view
     */
    public function transferMoney(){
        $page_title     = "Transfer Money Logs";

        $transactions   = Transaction::auth()->with(['payment_gateway'])->where('type',PaymentGatewayConst::TYPETRANSFERMONEY)
                            ->orderBy('id','desc')->get();
        return view('user.sections.transaction.index',compact(
            'page_title',
            'transactions'
        ));
    }
    
}
Transfer Money
top

Effortless and Secure Money Transfers

Our transfer system provides a seamless and secure way to move your funds. Enjoy a straightforward process with top-notch security features, ensuring that sending money to friends, family, or businesses is both quick and worry-free. Experience smooth transactions with confidence, knowing that your security is our highest priority.

  • Access the Transfer Section: Open the transfer section on our website or app.
  • Choose a Recipient: Select the recipient from your contacts or manually enter their details.
  • Enter the Amount: Specify the amount you want to transfer.
  • Authorize the Transfer: Confirm the transaction using your PIN or biometric authentication.
  • Receive Confirmation: Get a confirmation message indicating that your transfer was successful.
img