use jobs in seeds

This commit is contained in:
Denis Duliçi
2021-09-06 14:46:42 +03:00
parent 442b238854
commit 7fd3917d63
7 changed files with 38 additions and 22 deletions

View File

@ -3,11 +3,14 @@
namespace Database\Seeds;
use App\Abstracts\Model;
use App\Models\Common\Report;
use App\Jobs\Common\CreateReport;
use App\Traits\Jobs;
use Illuminate\Database\Seeder;
class Reports extends Seeder
{
use Jobs;
/**
* Run the database seeds.
*
@ -65,7 +68,7 @@ class Reports extends Seeder
];
foreach ($rows as $row) {
Report::create($row);
$this->dispatch(new CreateReport($row));
}
}
}