app\Blog::comments PHP Method

comments() public method

public comments ( )
    public function comments()
    {
        return $this->hasManyThrough('App\\Post_Comment', 'App\\Post');
    }

Usage Example

Example #1
0
 public function show(Blog $blog, $str)
 {
     $comments = $blog->comments()->paginate(config('app.paginat_max'));
     if ($blog != NULL) {
         return view('user.blog', compact('blog', 'comments'));
     } else {
         return view('errors.404');
     }
 }
All Usage Examples Of app\Blog::comments