/home/kueuepay/www/app/Models/UserWallet.php
<?php

namespace App\Models;

use App\Constants\GlobalConst;
use App\Models\Admin\Currency;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class UserWallet extends Model
{
    use HasFactory;
    public $timestamps = true;
    protected $fillable = ['balance', 'status','user_id','currency_id','created_at','updated_at'];

    protected $casts = [
        'id'                    => 'integer',
        'user_id'               => 'integer',
        'currency_id'           => 'integer',
        'balance'               => 'decimal:8',
        'profit_balance'        => 'decimal:8',
        'status'                => 'boolean',
    ];

    public function scopeAuth($query) {
        return $query->where('user_id',auth()->user()->id);
    }

    public function scopeActive($query) {
        return $query->where("status",true);
    }

    public function user() {
        return $this->belongsTo(User::class);
    }

    public function currency() {
        return $this->belongsTo(Currency::class);
    }

    public function scopeSender($query) {
        return $query->whereHas('currency',function($q) {
            $q->where("sender",GlobalConst::ACTIVE);
        });
    }
   

}
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