Skip to content

Tag: lumen

Return custom array in json model with Lumen

With Lumen 8 I have : Model : Store Controller : StoreController Repository : StoreRepository I can get my Store without any problem and get the json below : I would like to get open/close time of the Store. In my model I have a array (for test) and I can show it like that : And get this result

how to pass parameters to listener in laravel?

I registered LogConnectionFailed like this: The ConnectionFailed event is fired if no response is received for a given request. I need to The name of the class and the method in which this happened and duration time call http client in LogConnectionFailed class. Answer This is not possible through normal para…

Laravel Lumen Logging gives A facade root has not been set

I have set up the basic example of Laravel lumen with composer create-project –prefer-dist laravel/lumen demo. I am using Lumen version 8. My .env file looks like I have created a controller TrackerController and called it in routes/web.php. My /app/routes/web.php looks like I would like to add logging …

Custom service provider for Lumen

I’m new to Lumen, and have a fresh install (v8.2.4) and have followed the docs, trying to write my own service, but I keep getting error Like I said, its a fresh install according to the Lumen docs. in /bootstrap/app.php in /app/Providers/BatmanServiceProvider.php My controller: app/Http/Controllers/Mai…

PHP Swoole Notice ERRNO 1005

When Swoole is on heavy load and heavy requests I kept getting this Log: [2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): session#21022 does not exists [2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): session#21022 does not exists [2021-01-24 16:07:22 *33833.2] NOTICE finish (ERRNO 1005): …

Laravel with() and search using LIKE not working

So I have 2 tables, 1 table for storing debt(id, amount, category_id) and 1 table for storing debt categories(id, name). I am trying to pull the data for each month from the debt table, but I also have a search which seems to not work, I guess I am missing something. I have the following: Debt Model: This wor…