Files
Skunk-Lounge/app/Models/Transaction.php

33 lines
620 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Transaction extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'wallet_id',
'amount',
'type',
'description',
'hash',
];
/**
* Get the wallet that owns the transaction.
*/
public function wallet(): BelongsTo
{
return $this->belongsTo(Wallet::class);
}
}