KUJUNTI.ID MINISH3LL
Path : /var/www/html/mini-moneyexchange/app/Models/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/mini-moneyexchange/app/Models/Transfer.php


<?php

namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class Transfer extends Model
{
    use HasFactory, Notifiable, SoftDeletes;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'bank_id',
        'from_bank_account_id',
        'to_bank_account_id',
        'sender_phone',
        'receiver_phone',
        'currency_id',
        'amount',
        'fee',
        'partner_fee',
        'user_id',
        'transaction_type',
        'note',
        'sender_name',
        'receiver_name',
        'code'

    ];
    public function bank()
    {
        return $this->belongsTo(Bank::class);
    }
    public function user()
    {
        return $this->belongsTo(User::class);
    }
    public function fromBankAccount()
    {
        return $this->belongsTo(BankAccount::class,'from_bank_account_id');
    }
    public function toBankAccount()
    {
        return $this->belongsTo(BankAccount::class,'to_bank_account_id');
    }
    public function currency()
    {
        return $this->belongsTo(Currency::class);
    }
    public function bankAccountTransactions()
    {
        return $this->hasMany(BankAccountTransaction::class);
    }
}

© KUJUNTI.ID