code for statement import invoice mapping

This commit is contained in:
Steve Ng
2023-10-06 10:59:36 +08:00
parent ddc1df0d6e
commit bc5d1eff88
10 changed files with 392 additions and 31 deletions
+24
View File
@@ -0,0 +1,24 @@
<?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'];
protected $casts = [
'data' => 'array',
];
public static function boot() {
parent::boot();
static::creating(function ($model) {
$model->imported_by = auth()->user()->id;
});
}
}