I'm trying to display all replies that belong to a post, I've done this before and it worked perfectly fine then. Anyway, I set up my relations the way they should, I put this in my post model
public function replies() {
return $this->hasMany('App/Reply');
}
And I put this in my reply model
public function post()
{
return $this->belongsTo('App/Post');
}
Now I'm trying to display all the replies that belong to a certain post in my blade like this: @foreach ($post->replies as $reply) but it gives me the error
Class 'App/Reply' not found (View: C:\xampp\htdocs\laravel\ICT-Hulp\resources\views\posts\show.blade.php)
What is causing this, What am I doing wrong? Thanks in advance!
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2i652La
via IFTTT
Aucun commentaire:
Enregistrer un commentaire