dpdp42233 2018-12-02 23:21
浏览 74

Laravel似乎是缓存错误?

So I just had an error on laravel.

Call to a member function getName() on null

I was running this code

view()->composer('*', function ($view)
{
    $view->with('route_name', ucfirst(explode(".", \Route::current()->getName())[1]));
});

This code only broke in the first place on one of my pages, a newly added route. The pages that it worked on seem to be caching whatever was there before, I even made the second argument "test".

It seems to be caching the error when I've replaced the code? But only showing the error on the page it showed it, to begin with.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 sub地址DHCP问题
    • ¥15 delta降尺度计算的一些细节,有偿
    • ¥15 Arduino红外遥控代码有问题
    • ¥15 数值计算离散正交多项式
    • ¥30 数值计算均差系数编程
    • ¥15 redis-full-check比较 两个集群的数据出错
    • ¥15 Matlab编程问题
    • ¥15 训练的多模态特征融合模型准确度很低怎么办
    • ¥15 kylin启动报错log4j类冲突
    • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大