Level 4
I am facing a same problem, were you able to configure successfully?
I'm struggling to figure out how to use the Cookie package from Illuminate in Lumen. So far, the best I've see is a suggestion to include the package and then add the following to app.php:
$app->singleton('cookie', function () use ($app) {
return $app->loadComponent('session', 'Illuminate\Cookie\CookieServiceProvider', 'cookie');
});
$app->bind('Illuminate\Contracts\Cookie\QueueingFactory', 'cookie');
As far as I can tell, this would allow me to include cookie through dependency injection (though I haven't been able to get that to work anyway), but from my understanding of reading through the source code and online documentation, I should be able to use it as a singleton? Any help would be appreciated.
Please or to participate in this conversation.