for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Bavix\Wallet\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class Transaction extends Model
{
/**
* @var array
*/
protected $fillable = [
'payable_type',
'payable_id',
'uuid',
'type',
'amount',
'confirmed',
'meta',
];
protected $casts = [
'amount' => 'int',
'confirmed' => 'bool',
'meta' => 'json'
* @return string
public function getTable(): string
if (!$this->table) {
$this->table = \config('wallet.transaction.table');
}
return parent::getTable();
* @return MorphTo
public function payable(): MorphTo
return $this->morphTo();