title: php trait not found?
body: <p>Im not using laravel or any framework, i am following the tutorial in O<a href="https://rads.stackoverflow.com/amzn/click/com/1491905018" rel="nofollow noreferrer" rel="nofollow noreferrer">'reilly modern php book</a>. I'm  using php version 7;</p>
  
  <p>and when using traits i get this error</p>
  
  <pre><code>Fatal error: Trait 'Geocodable' not found in /Applications/MAMP/htdocs/eli9/RetailStore.php on line 5
  </code></pre>
  
  <p>here is the following code</p>
  
  <p>Geocodable.php</p>
  
  <pre><code>&lt;?php
  
  trait Geocodable{
  
      protected $address;
  
      protected $geocoder;
  
      protected $geocoderResult;
  
      public function setGeocoder(\Geocoder\Geocoder $geocoder)
      {
          $this-&gt;geocoder = $geocoder;
      }
  
      public function setAddress($address)
      {
          $this-&gt;address = $address;
      }
  
  
      public function getLatitude()
      {
          if(!isset($this-&gt;geocoderResult)){
              $this-&gt;geocodeAddress();
          }
  
          return $this-&gt;geocoderResult-&gt;first()-&gt;getLatitude();
      }
  
      public function getLongitude()
      {
          if(!isset($this-&gt;geocoderResult)){
              $this-&gt;geocodeAddress();
          }
  
          return $this-&gt;geocoderResult-&gt;first()-&gt;getLongitude();
      }
  
  
      public function getcodeAddress()
      {
          $this-&gt;geocoderResult = $this-&gt;gecoder-&gt;geocode($this-&gt;address);
  
          return true;
      }
  }
  </code></pre>
  
  <p>RetailStore.php</p>
  
  <pre><code>&lt;?php
  
  class RetailStore
  {
      use Geocodable;
  }
  </code></pre>