mavinoo / laravelBatch

insert batch and update batch in laravel
MIT License
564 stars 118 forks source link

exception : should not be called statically #81

Closed ylnwqm closed 2 years ago

ylnwqm commented 2 years ago

PHP Version : 7.4.9 Laravel Version : 8.0

app.php

'providers' => [
        Mavinoo\Batch\BatchServiceProvider::class,
 ],

'aliases' => [
        'Batch' => Mavinoo\Batch\BatchFacade::class,
],

when i use Batch::update($userInstance, $value, $index);

An exception occurred Non-static method Mavinoo\Batch\Batch::update() should not be called statically

But use batch()->update($userInstance, $value, $index); no exception in this way

mavinoo commented 2 years ago

hi @ylnwqm
reinstall package or update package to 2.3.4

insert

batch-insert

update

batch-update

joe820912boy commented 1 year ago

nice!! this solve the same problem

joe820912boy commented 1 year ago

@mavinoo I want to further understand could I add the 'providers' and 'alias' in my custimized service provider in my packages?

Or just could add it to app.php in config folder?