Path : /var/www/html/moneyexchange/app/Models/ |
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
Current File : /var/www/html/moneyexchange/app/Models/BankAccount.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 BankAccount extends Model { use HasFactory, Notifiable, SoftDeletes; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'bank_id', 'currency_id', 'bank_username', 'bank_number', 'user_id', 'credit', 'is_bank', 'responsible_by_user_id', 'is_active' ]; public function user() { return $this->belongsTo(User::class); } public function bank() { return $this->belongsTo(Bank::class); } public function currency() { return $this->belongsTo(Currency::class); } public function transactions() { return $this->hasMany(Transaction::class); } public function responsibleByUser() { return $this->belongsTo(User::class,'responsible_by_user_id','id'); } public function bankAccountTransaction() { return $this->hasMany(BankAccountTransaction::class); } public function transferFromBankAccount() { return $this->hasMany(Transfer::class,'from_bank_account_id'); } public function TransferToBankAccounts() { return $this->hasMany(Transfer::class,'to_bank_account_id'); } }