title: Laravel - Model Class not found
body: <p>When starting to work with models I got the following error </p>
  
  <blockquote>
    <p>Class Post not found`.  </p>
  </blockquote>
  
  <p>All I did:<br>
  - Created a Model with  the command <code>php artisan make:model</code><br>
  - Tried to get all entries from table <code>posts</code> with <code>echo Post::all()</code>  </p>
  
  <p>I used the following code:</p>
  
  <p><strong>router.php</strong></p>
  
  <pre><code>Route::get('/posts', function(){
      $results = Post::all();
      return $results;
  });
  </code></pre>
  
  <p><strong>Post.php</strong>  </p>
  
  <pre><code>&lt;?php 
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Post extends Model {
      protected $table = 'posts';    
  }
  </code></pre>
  
  <p>What I tried<br>
  - Renaming Class<br>
  - Dump-autoload (<a href="https://stackoverflow.com/questions/14284472/laravel-4-model-class-not-found">Laravel 4 Model class not found</a>)</p>