Closed Evhanz closed 5 years ago
hi @Evhanz use table model instead of table name https://github.com/mavinoo/laravelBatch/pull/14
#version dev-master
At last commit You send the model instead of the table name.
use Batch;
use App\Models\PollsSchedulersAreas;
$model = new PollsSchedulersAreas;
$columns = [
'a',
'b',
'c'
];
$data = [
['a1', 'b1', 'c1'],
['a2', 'b2', 'c3'],
];
Batch::insert($model, $columns, $data, 200);
#version 2.0
or install version 2.0 laravel-batch
composer require mavinoo/laravel-batch:2.0
and using
$batch->insert('polls_schedulers_areas', $columns, $data, 200);
Sorry for not answering, but version 2.0 worked for how the project was already done, but we will see if we move to the latest version, excellent work thanks
Sorry guys, but I have a big problem, in the last update I found this error in all the code that I used with its amazing package, I would love to fix it as fast as possible, help me please.
in my Code :
$columns = [ 'a', 'b', 'c', ]; $batch = new Batch $batch->insert('polls_schedulers_areas', $columns, $data, 200);