title: Fetch news from specific category along with each news writer in laravel
body: <p>I have following function in Category model:</p>
  
  <pre><code>public function news(){
      return $this-&gt;belongsToMany(News::class,'news_categories','category_id','news_id');
  }
  
  public function writer(){
      return $this-&gt;belongsToMany(NewsAuthor::class,'news_authors','news_id','user_id');
  }
  
  public static function getNewsByCategory($id, $limit){
      return Category::where('id', $id)-&gt;has('news')
        -&gt;with(['news' =&gt; function($q) use(&amp;$limit) {
           $q-&gt;latest()-&gt;limit($limit);
        }])-&gt;first();
  }
  </code></pre>
  
  <p>to fetch news by Category id, now, I also want to fetch news writer which is in the news_author table. </p>
  
  <p>How can I get news author with my function <code>getNewsByCategory</code>?</p>