-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call to undefined method Illuminate\Support\Facades\Redis::connect() #115
Comments
Same issue here, Is this because I'm using a certain Laravel version or is there another problem? |
@chis0m I am already solved this issue by installing PHP Redis extension, you can following this to phpredis installation https://github.com/phpredis/phpredis/blob/develop/INSTALL.md |
if you're using this package in laravel. Prefer to reuse the defined connection. $connection = $this->app->make('redis')->connection(config('prometheus.redis'))->client();
$adapter = Redis::fromExistingConnection($connection);
$registry = new CollectorRegistry($adapter, false);
$renderer = new RenderTextFormat();
$result = $renderer->render($registry->getMetricFamilySamples());
return response()->json(['data' => $result]); |
I solve this issue by installing
after that no more |
Thank you guys |
So installed the package in a Laravel 8.x application and I tried testing by running this part of the example
And I am getting the error
Call to undefined method Illuminate\Support\Facades\Redis::connect()
Which occurs in the package
vendor/promphp/prometheus_client_php/src/Prometheus/Storage/Redis.php:225
How do I fix this?
Thanks
The text was updated successfully, but these errors were encountered: