title: retrieve unread messages as model method eloquent
body: <p>I have a simple messaging system, the works like this,</p>
  <p>1 user can own many conversations
  1 user can be in receipt of many conversations
  1 conversation has many messages</p>
  <p>The table structure looks like this,</p>
  <p><strong>Coversation</strong>.</p>
  <p>ID |
  title |
  created_by (user) |
  recipient (user) |
  created_at |
  updated_at |</p>
  <p><strong>Messages</strong>.</p>
  <p>ID | content | conversation_id | sent_by | read_at | created_at | updated_at</p>
  <p>What I am wanting to achieve is to get a count (or collection) all the unread users as relationship/model function, i.e.</p>
  <pre><code>$user-&gt;unreadMessages();
  </code></pre>
  <p>Is this possible? I am struggling to work out how to do it, as I cant just query the messages, I need only the messages for conversations that I the user is involved in but they have not sent.</p>
  <p>Hope some can help. I am utterly confused, maybe database needs some redesigning to aid read receipts?</p>