title: How do I create a facade class with Laravel?
body: <p>I'm having a little problem with creating a facade model class with Laravel. I have followed <a href="http://laravel.com/docs/facades">http://laravel.com/docs/facades</a> but I guess I'm missing something.</p>
  
  <p>I have created a folder in <code>app/models</code> called <code>foo</code>. In that folder I have two files. </p>
  
  <p>First file (Foo.php):</p>
  
  <pre><code>&lt;?php
  namespace Mynamespace;
  
  class Foo {
      public function method() {
  
      }
  }
  ?&gt;
  </code></pre>
  
  <p>Second file (FooFacade.php):</p>
  
  <pre><code>&lt;?php
  use Illuminate\Support\Facades\Facade;
  
  class Foo extends Facade {
      protected static function getFacadeAccessor() { return 'foo'; }
  }
  ?&gt;
  </code></pre>
  
  <p>Then I added <code>Foo =&gt; 'Mynamespace\Foo'</code> to the <code>aliases</code> array in <code>app/config/app.php</code> and ran <code>composer update</code> and <code>composer dump-autoload</code>.</p>
  
  <p>Now when I try to run <code>Foo::method()</code> I get <code>Non-static method Mynamespace\Foo::method() should not be called statically</code>. What am I doing wrong?</p>