title: Laravel Eloquent multiple method chaining
body: <p>I have a project with laravel that i have some tables like below:  </p>
  
  <pre><code>#users table:
  -&gt;id
  -&gt;username
  -&gt;password
  
  #profile table:
  -&gt;id
  -&gt;user_id
  -&gt;firstname
  -&gt;lastname
  
  #articles table:
  -&gt;id
  -&gt;user_id
  -&gt;title
  -&gt;body
  
  #photos table:
  -&gt;id
  -&gt;article_id
  -&gt;path
  </code></pre>
  
  <p>to getting user articles photo i'm wondering what should i do with eloquent i set the relationships in model but when i first just tried it i noticed i cant just do something like  </p>
  
  <pre><code>User::find(1)-&gt;articles()-&gt;photos();
  </code></pre>
  
  <p>then i tried some other ways but i failed!<br>
  and now i want to know how can i retrieve the photos related to the user and its article?<br>
  thank you guys in advance.</p>