mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
33 lines
646 B
PHP
33 lines
646 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class TransactionMappingLog extends Model
|
|
{
|
|
protected $fillable = ['imported_by','data','imported_date','type'];
|
|
|
|
/**
|
|
* Get the attributes that should be cast.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'data' => 'array',
|
|
];
|
|
}
|
|
|
|
public static function boot() {
|
|
parent::boot();
|
|
|
|
static::creating(function ($model) {
|
|
$model->imported_by = auth()->user()->id;
|
|
});
|
|
}
|
|
|
|
}
|