O'Reilly logo
  • GIL EG thinks this is interesting:

/ file: app/Research.php
  <?php namespace App;

  use Illuminate\Database\Eloquent\Model;

  class Research extends Model {

    public function user()
    {
      return $this->belongsTo('App\User');
    }

    public function sections()
    {
      return $this->hasMany('App\Section');
    }

  }

  // file: app/Section

From

Cover of Learning Laravel's Eloquent

Note

hasManyThrough() to access related models of related models