this makes possible adding extra attributes to models

This commit is contained in:
Sevan Nerse
2021-02-26 17:16:48 +03:00
parent 962e626c9e
commit 5878c96c3a
16 changed files with 54 additions and 99 deletions

View File

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