我有一个bug
如果我在blade.php文件里的<a href="{.......}">
里写
{ $activity->subject->path() }
就会得到下图这个报错
Call to a member function path() on null (View: /Users/tg/Desktop/MyWork/forum/resources/views/profiles/activities/created_thread.blade.php) (View: /Users/tg/Desktop/MyWork/forum/resources/views/profiles/activities/created_thread.blade.php)
但是同样的,如果我用dd检测:
{ dd($activity->subject->path()) }
就会得到我应该有的路径
"/threads/python/68"
求问这是怎么回事?