title: Laravel Eloquent to join table and count related
body: <p>How do I use join with Eloquent taking in consideration the following table structure:</p>
  
  <p>I have a properies table</p>
  
  <pre><code>---------------------
  ID    | Name 
  ---------------------
  1     | Property Name
  </code></pre>
  
  <p>than I have rooms </p>
  
  <pre><code>----------------------
  RoomID | Property
  ----------------------
  A-212  | 1
  ---------------------- 
  F-1231 | 1
  </code></pre>
  
  <p>here Property is the foreign key
  than I want to get all Properties and count how many rooms do they have each</p>
  
  <p>The query which retrives all looks like</p>
  
  <pre><code>   class PropertiesRepository extends EloquentBaseRepository implements PropertiesInterface
  {
  
      use TaggableRepository;
  
      /**
       * Construct 
       * @param Properties $properties 
       */
      public function __construct( Properties $properties )
      {
          $this-&gt;model = $properties;
      }
       /**
       * Get all properties joining rooms
       * @return Properties
       */
      public function getAll()
      {
          return $this-&gt;model-&gt;get();
      }
  }
  </code></pre>
  
  <p>How do I extend this query to get the desired result?</p>