You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -367,6 +368,106 @@ class PhpVersionProcessor implements ProcessorInterface {
367
368
]
368
369
```
369
370
371
+
## Lumen Installation
372
+
373
+
* Create a config folder in your projects root directory (if you don't already have one), then add a logging.php config file there.
374
+
Use the [Laravel logging.php](https://github.com/laravel/laravel/blob/master/config/logging.php) config file as an example/starting point.
375
+
You can also add all the other "missing" config files from the Laravel config folder to your Lumen project.
376
+
377
+
* To use these config files you have to load them in your applications bootstrap/app.php file (or add your own service provider file and load it in that same file).
378
+
379
+
You also need to make sure that all the needed basic config values for logtodb is set by either:
380
+
* Copy over logtodb.php from the config folder of this addon,
381
+
* or just add all your log-to-db options in your applications config/logging.php file (probably easiest). Just follow the
382
+
configuration example above under the [configuration](#configuration) section.
After adding the service provider you should be able to run the database migration with:
422
+
```
423
+
php artisan migrate
424
+
```
425
+
Please note that you need a working db connection in Lumen at this point.
426
+
427
+
And then maybe it works... ¯\_(ツ)_/¯
428
+
429
+
#### Using worker queue to write log to db with Lumen
430
+
You would need to set up a queue driver in Lumen before you can use the queue (default is: QUEUE_CONNECTION=sync, which is basically no queue).
431
+
More info about the [queues in Lumen doc](https://lumen.laravel.com/docs/7.x/queues) (they are mostly the same as Laravel).
432
+
I would recommend the Redis queue driver but database should also work.
433
+
434
+
#### How to make Redis work in Lumen (in general).
435
+
install per command
436
+
```
437
+
composer require predis/predis
438
+
composer require illuminate/redis
439
+
```
440
+
441
+
OR add to composer.json
442
+
```
443
+
...
444
+
"require": {
445
+
"predis/predis": "~1.0",
446
+
"illuminate/redis": "5.0.*",
447
+
...
448
+
```
449
+
Or install other alternatives to predis.
450
+
451
+
Add service provider and enable eloquent in your bootstrap/app.php file (Eloquent only needed if you use the model/model helper class to fetch new log event);
0 commit comments