按照大神的步骤来的,然后出现了一个问题,就是插入show.blade.php测试的时候
<div class="container">
<div class="row">
<div class="blog-post" role="main">
{!! $html !!}
<hr>
@foreach($discussion->comments as $comment)
<div class="media">
<div class="media-left">
<a href="#">
<img class="media-object img-circle" alt="64x64" src=" $comment->user->avatar " style="width: 64px;height: 64px"> </a>
</div>
<div class="media-body">
<h4 class="media-heading">
$comment->user->name
</h4>
$comment->body
</div>
</div>
@endforeach
</div>
</div><br></br>
出现以下错误:
LogicException in Model.php line 2673: Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation
Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation (View: /home/vagrant/Code/Laravel/resources/views/forum/show.blade.php)<br></br>
卡在这里,不知如何处理?