title: How to do a Left Outer join with Laravel?
body: <p>i want information from one table and if there is matched info from another table that as well.</p>
  
  <p>this my code</p>
  
  <pre><code> $scoreObject = DB::table('responses')
          -&gt;select('responses.id', 'responses.questions_id', 'responses.answer_id', 'responses.open_answer', 'responses.user_id',  'responses.scan_id',
               'questions.question', 'questions.question_nr', 'questions.type', 'questions.totalsection_id',
              'answers.id as answerID', 'answers.answer', 'answers.questions_id', 'answers.points'
          )
          -&gt;Join('answers as answers', 'responses.answer_id', '=', 'answers.id')
          -&gt;Join('questions as questions', 'answers.questions_id', '=', 'questions.id')
          -&gt;orderBy('questions.id', 'ASC')
          -&gt;where('responses.scan_id', $scanid)
          -&gt;where('responses.user_id', $userid)
          -&gt;groupBy('questions.id')
          -&gt;get();
  </code></pre>
  
  <p>It returns all responses that have matches with answers (answers.questions_id questions.id'). some responses don't have matched (because there is no responses.answer_id) but i still want the responses info then. </p>
  
  <p>how can i get such a left outer join in laravel ?</p>