mavinoo / laravelBatch

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

Facade doesn't seem to work #2

Closed MikeMnD closed 6 years ago

MikeMnD commented 6 years ago

At least with 5.5 - so i needed to set it like:

use Mavinoo\LaravelBatch\LaravelBatchFacade as Batch;

or else when Batch::update is called goes toErrorException: Non-static method Mavinoo\LaravelBatch\Batch::update() should not be called statically

Generally it'sgood practice to put the facade in namespace/folder Facade and the class name to be the same as the facade.

Just check most of the other packages.

mavinoo commented 6 years ago

You must first In the app.php file, add two items in the config folder that are named in the README.md file.

  1. Service Provider
  2. Aliases

    https://github.com/mavinoo/laravelBatch/blob/master/README.md

And then use the defined facade.

example: Example Batch Update 1 Example Batch Update 2 Example Batch Insert

MikeMnD commented 6 years ago

These two lines were added in the app.php in config

mavinoo commented 6 years ago

not use facade Batch => use Batch in aliases app.php in config

examples_1

or with use facade batch

examples_2