title: Query in finding the data within the row
body: <p>I need to write a query,
  subjects table</p>
  <pre><code>1. Id=1  name= subject 1, teacher_id = 1, course_id = 1,;
  2. Id=1  name= subject 2, teacher_id = 2, course_id = 3;
  3. Id=1  name= subject 3, teacher_id = 3, course_id = 4 
  4. Id=1  name= subject 3, teacher_id = 4, course_id = 5 ;(exclude)
  </code></pre>
  <p>I have a student_exclusion table with student_id, course_id and teacher_id.This model is for the student doesnot want to see the subjects from subjects whose teacher_id and course_id are these,</p>
  <pre><code>student_id = 1, teacher_id = 3,course_id=4
  student_id = 1, teacher_id = 4,course_id=5
  student_id = 2, teacher_id = 3,course_id=5
  </code></pre>
  <p>I need to display the all the subjects except 3 and 4(which means I need to display the subjects where teacher_id!=Student_exclusion.teacher_id and course_id!=student_exclusion.course_id). How can I write the query? I can get the teacher_id and course_id from here, But I need to check with a particular row . All I want to do is, get all the teacher_id and course_id from student_exclusion table, and then From subject model (Get all the subjects where teacher_id and course_id != studentExcludedCourseTeacher). Its like , Student add the teacher course id in the (I dont want to see the subjects where course=1 and teacher = 1). (From a row )</p>
  <pre><code>$studentExcludedCourseTeacher= StudentExclusion::where('user_id', auth()-&gt;user()-&gt;id)-&gt;get('teacher_id', 'course_id');
  $subjectList = Subject::-&gt;where(function ($query) use ($studentExcludedCourseTeacher) {
  ??               
  );
   })-&gt;get();
  </code></pre>