title: What is the best way to relate a table through another to user directly?
body: <p>The system of three tables</p>
  <p>user table</p>
  <blockquote>
  <p>users - id, name, email, user_type (student, teacher)</p>
  </blockquote>
  <p>events table</p>
  <blockquote>
  <p>events - id, student_id, teacher_id, meeting_id, event_details(JSON)</p>
  </blockquote>
  <p>Meeting table</p>
  <blockquote>
  <p>id, meeting_string(unique random string), start_time, meeting_details(API response JSON)</p>
  </blockquote>
  <p>What is the best way to get teacher Meetings?</p>
  <p>I did it by</p>
  <pre class="lang-php prettyprint-override"><code>return Meeting::whereHas('event', function ($q){
     $q-&gt;where('teacher_id', $this-&gt;id);
  })-&gt;get();
  </code></pre>
  <p>but it's not supporting create([]) throwing create on collection error.</p>
  <p>I could get the tutor through this method on meeting model</p>
  <pre class="lang-php prettyprint-override"><code>public function tutor(): HasOne
  {
      return $this-&gt;event-&gt;tutor();
  }
  </code></pre>
  <p>It will be helpful if the solution supports <code>teacherMeetings()-&gt;create([])</code></p>