this makes possible adding extra attributes to models

This commit is contained in:
Sevan Nerse
2021-02-26 15:38:45 +03:00
parent 19093668ec
commit 962e626c9e
16 changed files with 139 additions and 43 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Imports\Banking;
use App\Abstracts\Import;
use App\Events\Common\ModelCreated;
use App\Http\Requests\Banking\Transaction as Request;
use App\Models\Banking\Transaction as Model;
@@ -10,7 +11,11 @@ class Transactions extends Import
{
public function model(array $row)
{
return new Model($row);
$model = new Model($row);
event(new ModelCreated($model, $row));
return $model;
}
public function map($row): array