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
I'm not able to reproduce the issue, I've several bots with Laravel 9 and works just fine.
You should not define the cache store inside the config.php, because at a config resolution time the service container is not yet booted, thats why you are getting an error. The cacherepository is automatically resolved by the service provider (https://github.com/nutgram/nutgram/blob/master/src/NutgramServiceProvider.php#L56) as long you define a default cache driver in the laravel config.
I was using a controller to receive the webhook updated instead of __invoke() the bot. So all my handlers was in that controller. When I moved my handlers to routes/telegram.php and used __invoke() to run the bot, as the documentation states, all worked just fine.I don't know if you want to do anything with this information, so I will leave the issue opened, but feel free to close it.
Nutgram version
3.16.0
Describe the bug
I'm using laravel 9. The cache wasn't working so I wasn't able to use Conversations.
In the documentation it says that if you use laravel, you don't need to do anything for the cache to work.
I'm suspecting that in versions prior to laravel 9 the file
config/nutgram.php
could detect the laravel cache. But in Laravel 9, it can't.I managed to solve this problem using the following code directly in the controller:
But if I try to implement it as a default setting in
config/telegram.php
, I got a error:Generates the error:
To Reproduce
config/nutgram.php
'config' attribute to use'cache' => \Cache::store('redis'),
Expected behavior
Cache everything
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: