lumen
Remove cache keys by pattern/wildcard
You can use cache tags. Cache tags allow you to tag related items in the cache and then flush all cached values that have been assigned a given tag. You may access a tagged cache by passing in an ordered array of tag names. For example, let’s access a tagged cache and put value in … Read more
Where to register Facades & Service Providers in Lumen
In your bootstrap/app.php, make sure you’ve un-commented: $app->withFacades(); Then, register you class alias and check if it already exists (else your tests will break): if (!class_exists(‘JWTAuth’)) { class_alias(‘Tymon\JWTAuth\Facades\JWTAuth’, ‘JWTAuth’); } To register your ServiceProvider, check your bootstrap/app.php: /* |————————————————————————– | Register Service Providers |————————————————————————– | | Here we will register all of the application’s service … Read more
Lumen (Laravel) Eloquent php artisan make:model not defined
You’re seeing this error because Lumen doesn’t come with make:model. To see a list of all the artisan commands you have at your disposal just run php artisan. That being said I did just find this package which I’ve added to a lumen installation and it seems to work fine https://github.com/webNeat/lumen-generators#installation Hope this helps!
PHP Lumen Call to a member function connection() on null
You should uncomment the Eloquent $app->withEloquent() call in bootstrap/app.php. https://lumen.laravel.com/docs/5.2/database#basic-usage Update: Latest version of the docs https://lumen.laravel.com/docs/5.8/database, check section Eloquent ORM
NotFoundHttpException with Lumen
The problem was solved by changing the $app->run(); in /public/index.php to $request = Illuminate\Http\Request::capture(); $app->run($request);
Laravel Lumen Memcached not found
I spent 3 hours on this problem today. With the help of the post of demve in this topic, I found the solution. Very simple! I hope it won’t affect me later in my development. Just to it, in the .env file : CACHE_DRIVER=array SESSION_DRIVER=array QUEUE_DRIVER=array Ok, I make an UPDATE because I was faced … Read more
Lumen Micro Framework => php artisan key:generate
The Laravel command is fairly simple. It just generates a random 32 character long string. You can do the same in Lumen. Just temporarily add a route like this: $router->get(‘/key’, function() { return \Illuminate\Support\Str::random(32); }); Then go to /key in your browser and copy paste the key into your .env file. Afterwards remove the route. … Read more
Change Timezone in Lumen or Laravel 5
You can set your app time zone by configuring app.php file in config folder . To change time zone , modify the value of timezone in app.php file. This is written in this section |————————————————————————– | Application Timezone |————————————————————————– | | Here you may specify the default timezone for your application, which | will be … Read more