title: PHP Fatal error: Class 'User' not found in eval()'d code on line 1
body: <p>I'm using <a href="http://packalyst.com/packages/package/zizaco/entrust" rel="nofollow">ENTRUST (Laravel 5 Package)</a>. When I use command <code>User::all();</code> in Php artisan tinker's Shell command line. It gives me error </p>
  
  <blockquote>
    <p>PHP Fatal error:  Class 'User' not found in eval()'d code on line 1</p>
  </blockquote>
  
  <p>but after trying 2-3 different combination(which are wrong) if I use the same <code>User::all();</code>, it gives me correct result. It looks weird.</p>
  
  <p>I'm new to PHP as well as Laravel.</p>
  
  <p><strong>User.php</strong></p>
  
  <pre><code>&lt;?php
  
  use Zizaco\Entrust\Traits\EntrustUserTrait;
  
  class User extends Eloquent
  {
      use EntrustUserTrait; // add this trait to your user model
  }
  </code></pre>
  
  <p>Console output:</p>
  
  <pre><code>Psy Shell v0.7.2 (PHP 5.5.9 ΓÇö cli) by Justin Hileman
  &gt;&gt;&gt; User::all();
  PHP Fatal error:  Class 'User' not found in eval()'d code on line 1
  &gt;&gt;&gt; App/User::all();
  PHP Fatal error:  Class 'User' not found in eval()'d code on line 1
  &gt;&gt;&gt; App\User::all();
  PHP Fatal error:  Class 'App\User' not found in eval()'d code on line 1
  &gt;&gt;&gt; User::all();
  =&gt; Illuminate\Database\Eloquent\Collection {#664
       all: [
         User {#665
           id: 1,
           name: "Kartik",
           email: "******************",
           password: "qwerty",
           remember_token: null,
           created_at: "2016-08-18 17:13:40",
           updated_at: "2016-08-18 17:13:40",
         },
         User {#666
           id: 2,
           name: "Bhandari",
           email: "**************",
           password: "qwerty",
           remember_token: null,
           created_at: "2016-08-20 11:37:26",
           updated_at: "2016-08-20 11:37:26",
         },
       ],
     }
  </code></pre>