Thanks that fixed the controller but I still can't echo out the replies.
Controller is now as follows:
public function index($id)
{
//show replies to post
$post = Post::with('user', 'reply')->where('id', $id)->get();
return view('replies')->with('post', $post);
}
{{ $post->name }}
returns error "Undefined property:"
It is really strange because if I echo the post variable via
{{$post}}
I can see it returns array
{"id":1,"name":"Excellent service","content":"I have been receiving excellent service from my carrier as of lately","topic_id":"1","created_at":"2015-05-23 13:54:57","updated_at":null,"deleted_at":null,"user_id":null,"user":null,"reply": [{"id":1,"content":"That's awesome","created_at":"2015-05-24 10:22:33","updated_at":null,"deleted_at":null,"user_id":1,"post_id":1}]}