-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Non-static method Redis::hGet() cannot be called statically #11
Comments
我尝试过修改。最后提示我"Connection refused [tcp://127.0.0.1:6379]",折腾了很久,还是解决不了问题,折腾的我都进行不下去了。 |
if you deploy on your own computer and use sublime text, "use Redis" in file larabbs\app\Models\Traits\LastActivedAtHelper.php has no problem. you may replace "use Redis" with "use Illuminate\Support\Facades\Redis" on the contrary if you deploy on the remote server. |
@Jeepin-Ann maybe you should change REDIS_HOST=127.0.0.1 to REDIS_HOST=redis in .env that file under your project. |
use Redis; 和 use Illuminate\Support\Facades\Redis; 有什么区别,确实解决了我的问题,但是还想问一下他俩的区别 |
@zoulux 没区别,是个 alias 的关系 |
predis扩展与laravel redis别名的冲突,如果PHP环境安装有predis扩展, |
Windows下LastActivedAtHelper的Redis路径错误
larabbs\app\Models\Traits\LastActivedAtHelper.php
delete : use Redis;
add : use Illuminate\Support\Facades\Redis;
The text was updated successfully, but these errors were encountered: