title: PHP Error: Class 'Page' not found in laravel 8 tinker
body: <p>I'm Inserting some dummy data using the factory model class using this command on tinker:
  When i run</p>
  <pre><code>composer dump-autoload,
  php artisan tinker,  
  Page::factory(10)-&gt;create()
  </code></pre>
  <p>Then this error shows</p>
  <p>PHP Error:  Class 'Page' not found in <code>/var/www/html/laravel/laravel8-blogeval()'d</code> code on line 1</p>
  <p><a href="https://i.stack.imgur.com/cni44.png" rel="nofollow noreferrer">image description here</a></p>
  <p>My model file location <code>app\Models\Page.php</code></p>
  <pre><code>&lt;?php
  
  namespace App\Models;
  
  use Illuminate\Database\Eloquent\Factories\HasFactory; 
  use Illuminate\Database\Eloquent\Model;
  
  class Page extends Model {
      use HasFactory;
       /**
       * The attributes that are mass assignable.
       *
       * @var array
       */
      protected $fillable = [
          'title',
          'slug',
          'body',
          'excerpt',
          'image',
          'thumb',
          'view_count',
          'user_id',
          'meta_keywords',
          'meta_description',
          'social_image',
          'order',
          'published_at',
          'is_active',
          'is_destroy'
      ]; }
  </code></pre>
  <p>My factory file location  <code>database/factories/PageFactory.php</code></p>
  <pre><code>&lt;?php
  
  namespace Database\Factories;
  
  use App\Models\Page;
  use App\Models\User;
  use Illuminate\Database\Eloquent\Factories\Factory;
  use Illuminate\Support\Str;
  
  class PageFactory extends Factory
  {
      /**
       * The name of the factory's corresponding model.
       *
       * @var string
       */
      protected $model = Page::class;
  
      /**
       * Define the model's default state.
       *
       * @return array
       */
      public function definition()
      {
          $title = $this-&gt;faker-&gt;title;
          $slug = Str::slug($title);
          $user = User::count() &gt;= 20 ? User::inRandomOrder()-&gt;first()-&gt;id: User::factory();   
        
          return [
              'title'=&gt; $title,
              'slug' =&gt; $slug,
              'body' =&gt; $this-&gt;faker-&gt;text(300),
              'image' =&gt; $this-&gt;faker-&gt;imageUrl(900, 300),
              'user_id' =&gt; $user,
          ];
      }
  }
  </code></pre>
  <p>How to insert dummy data in Laravel 8 using tinker please? Thank you.</p>