title: Laravel 5 badmethodcallexceltiopn with model database query builder
body: <p>I'm having a problem with a bad method call exception, the error is this </p>
  
  <pre><code>BadMethodCallException in Builder.php line 2443:
  Call to undefined method Illuminate\Database\Query\Builder::lugars()
  in Builder.php line 2443
  at Builder-&gt;__call('lugars', array()) in Builder.php line 1239
  at Builder-&gt;lugars() in Builder.php line 1239
  </code></pre>
  
  <p>I was told once that the problem was not defining the tables name in the MODEL, BUT it is in the model, so I don't see what's the problem</p>
  
  <p>here is the model: 
  `
      
  
  <pre><code>namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  
  class Lugar extends Model
  {
      //
       protected $table = 'lugares';
  
       public function Lugares(){
  
          return $this-&gt; belongsTo('App\Empresa');
      }
      public function Users(){
  
          return $this-&gt; belongsToMany('App\User','lugares_usuarios', 'user_id', 'lugar_id');
      }
  }
  </code></pre>
  
  <p>`</p>
  
  <p>i think the problem is on the Lugares model, since it is the only place where the protected $table is... </p>
  
  <p>any clues on what I can do? </p>