title: Laravel relationship: query with multiple Foreign keys
body: <p>I have the following db schema:</p>
  
  <pre><code>    //Pages schema
      Schema::create('pages', function( $table )
          {
  
              $table-&gt;increments('id');
              $table-&gt;softDeletes();
              $table-&gt;timestamps();
              $table-&gt;integer('parent_id');
              $table-&gt;integer('ordination');
              $table-&gt;unsignedInteger('title_id'); //Refer to strings
              $table-&gt;unsignedInteger('description_id'); //Refer to strings
              $table-&gt;unsignedInteger('url_id'); //Refer to strings
  
  
  
              //Foreign key
              $table-&gt;foreign('title_id')-&gt;references('id')-&gt;on('strings');
              $table-&gt;foreign('description_id')-&gt;references('id')-&gt;on('strings');
              $table-&gt;foreign('url_id')-&gt;references('id')-&gt;on('strings');
  
          });
  
  
  
      //Strings
      Schema::create('strings', function( $table )
              {
  
                  $table-&gt;increments('id');
                  $table-&gt;softDeletes();
                  $table-&gt;timestamps();
                  $table-&gt;text('en');
                  $table-&gt;text('de');
  
              });
  </code></pre>
  
  <p>How I can retrieve a Page Object from the correspondent url string? </p>
  
  <p>I would have a page object or array like the follow:</p>
  
  <pre><code>$page['url']['en'] = 'about' 
  $page['title']['en']= 'About title'
  $page['description']['en']= 'About description'
  etc..
  </code></pre>
  
  <p>I can retrieve the page Object from the related url executing the following eloquent query:</p>
  
  <pre><code>    $page= Pages::whereHas('url', function( $url )
      {   
          $url-&gt;where('en', '=', 'About');
  
      })-&gt;first();
  </code></pre>
  
  <p>With this Eloquent model:</p>
  
  <pre><code> class Pages extends Eloquent {
  
      protected $table = 'pages';
  
      public function url()
  
          {
  
              return $this-&gt;belongsTo('Strings');
  
          }
  }
  </code></pre>
  
  <p>This will not retrieve the string values for title, description and url, but only their id.</p>
  
  <p>How I can do that?</p>