title: Laravel 5: how to prefill response from hasMeny
body: <p>I'm new in Laravel and I can't found how to do next:
  There are entites Books, Chapters and Recepis.</p>
  
  <p>Recepis belongs to book by book_id FK.
  Chapters belongs to book by book_id FK.</p>
  
  <p>Recpies and Chapters are not linked through DB. But I need to linke them on next logic. Each Recepi has page number where is located in book and each chapter has range of pages strat_page to end_page.</p>
  
  <p>When I call book->find(id) from controller I need to get json like:</p>
  
  <pre><code>{
              "id": 132,
              "isbn": "xxx-xx-xx-xxx-x",
              "title": "Bartje BOOK”,
              "author_id": 8,
              "publisher_id": 6,
              chapters:[
                  {
                      title : "kidkdk"
                      startpage: 1
                      endpage: 10
                      recepis: [
                          {
                              recepie_id: 1,
                              title: "uyuy",
                              image: "http://kfsklkldkfldkf"
                          },
                          {
                              id: 2,
                              title: "ysysy",
                              image: "http://kfsklkldkfldkf"
                          }
                      ]
                  }
              ]
          }
  </code></pre>
  
  <p>Is there any posibility to do some logic in Book->chapters() method?</p>