title: Laravel LeftJoin return duplicate value from first column (mysql)
body: <p>Column workers:
  <a href="https://i.stack.imgur.com/6SoIs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6SoIs.png" alt="enter image description here"></a></p>
  
  <p>Column recommendations:
  <a href="https://i.stack.imgur.com/8jWWB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8jWWB.png" alt="enter image description here"></a></p>
  
  <p>My query:</p>
  
  <pre><code>$getRecommendationWorker = Worker::select('workers.id', 'workers.name', 'workers.photo', 'workers.description', 'workers.profile_worker', 'recommendations.recommendation', 'recommendations.author', 'recommendations.work_author', 'recommendations.profile_author')
  -&gt;leftJoin('recommendations', 'workers.id', '=', 'recommendations.worker_id')
  -&gt;get();
  </code></pre>
  
  <p>Laravel return:</p>
  
  <pre><code>{"id":5,"name":"Piotr Debowski","photo":"3c29641e2a.jpeg","description":"sdasdasd","profile_worker":"https:\/\/codepen.io\/","recommendation":"pierwsza rekomendacja","author":"Jan Kowalski","work_author":"IT spec","profile_author":"https:\/\/stackoverflow.com\/questions\/43136250\/eloquent-join-table-with-two-conditions"}
  {"id":5,"name":"Piotr Debowski","photo":"3c29641e2a.jpeg","description":"sdasdasd","profile_worker":"https:\/\/codepen.io\/","recommendation":"druga rekomendacja","author":"Jan Wo\u017aniak","work_author":"dsad","profile_author":"https:\/\/nczas.com\/2018\/08\/21\/wreszcie-zatrzymali-t"}
  </code></pre>
  
  <p>I have the <code>id</code>,<code>name</code> and other value from table <code>workers</code> twice returned.
  I want return look like this:</p>
  
  <pre><code>{"id":5,"name":"Piotr Debowski","photo":"3c29641e2a.jpeg","description":"sdasdasd","profile_worker":"https:\/\/codepen.io\/","recommendation":"pierwsza rekomendacja","author":"Jan Kowalski","work_author":"IT spec","profile_author":"https:\/\/stackoverflow.com\/questions\/43136250\/eloquent-join-table-with-two-conditions","recommendation":"druga rekomendacja","author":"Jan Wo\u017aniak","work_author":"dsad","profile_author":"https:\/\/nczas.com\/2018\/08\/21\/wreszcie-zatrzymali-t"}
  </code></pre>
  
  <p>I want from table <code>workers</code> return only one row and from table <code>recommendations</code> all records related to the first table.
  When I use <code>groupBy</code> (for example: <code>...-&gt;-&gt;groupBy('workers.id')</code>) return me only frst record from table <code>recommendations</code>. I can't use <code>where</code>, because all values will be displayed on the same page.
  Column <code>worker_id</code> is related to table <code>workers</code></p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Worker model:</p>
  
  <pre><code>public function recommendations()
  {
      return $this-&gt;hasMany('App\Recommendation');
  }
  </code></pre>
  
  <p>Recommendation model:</p>
  
  <pre><code>public function workers()
  {
      return $this-&gt;belongsTo('App\Worker');
  }
  </code></pre>