title: Why can't Laravel find the Voyager Seeder?
body: <p>I was working on a migration in my project and instead of running <code>php artisan migrate</code> I ran <code>php artisan migrate:fresh</code> and this then cleared all my tables and the data in them. Now my DB has all blank tables but now I am running into an issue when I am trying to seed it again. I am able to seed it with the seeders I have made but I am also using voyager and I am unable to run the voyager seeder.</p>
  <p>The <a href="https://voyager-docs.devdojo.com/getting-started/installation" rel="nofollow noreferrer">voyager docs</a> says that I should run this command to run seed the voyager tables:</p>
  <pre><code>php artisan db:seed --class=VoyagerDatabaseSeeder
  </code></pre>
  <p>But when I run this, it gives me the following error:</p>
  <pre><code> Illuminate\Contracts\Container\BindingResolutionException 
  
    Target class [Database\Seeders\VoyagerDatabaseSeeder] does not exist.
  
    at vendor/laravel/framework/src/Illuminate/Container/Container.php:835
      831▕ 
      832▕         try {
      833▕             $reflector = new ReflectionClass($concrete);
      834▕         } catch (ReflectionException $e) {
    ➜ 835▕             throw new BindingResolutionException(&quot;Target class [$concrete] does not exist.&quot;, 0, $e);
      836▕         }
      837▕ 
      838▕         // If the type is not instantiable, the developer is attempting to resolve
      839▕         // an abstract type such as an Interface or Abstract Class and there is
  
        +23 vendor frames 
    24  artisan:37
        Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  </code></pre>
  <p>And this is how my directory is laid out:</p>
  <p><a href="https://i.stack.imgur.com/Z0Tk5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z0Tk5.png" alt="enter image description here" /></a></p>
  <p>And you can see that the <code>VoyagerDatabaseSeeder.php</code> does exist but for some reason, laravel can't seed it? Any ideas?</p>
  <p>----------- Comments [ composer dump-autoload ] -------------</p>
  <p>This was the result from <code>composer dump-autoload</code>:</p>
  <pre><code>mobile-mastery-latest git:(enhancement/auth-user) ✗ composer dump-autoload
  Generating optimized autoload files
  &gt; Illuminate\Foundation\ComposerScripts::postAutoloadDump
  &gt; @php artisan package:discover --ansi
  Discovered Package: arrilot/laravel-widgets
  Discovered Package: bumbummen99/shoppingcart
  Discovered Package: cartalyst/stripe-laravel
  Discovered Package: facade/ignition
  Discovered Package: fideloper/proxy
  Discovered Package: fruitcake/laravel-cors
  Discovered Package: intervention/image
  Discovered Package: larapack/doctrine-support
  Discovered Package: larapack/voyager-hooks
  Discovered Package: laravel/tinker
  Discovered Package: laravel/ui
  Discovered Package: nesbot/carbon
  Discovered Package: nunomaduro/collision
  Discovered Package: tcg/voyager
  Package manifest generated successfully.
  Generated optimized autoload files containing 5855 classes
  ➜  mobile-mastery-latest git:(enhancement/auth-user) ✗ php artisan db:seed --class=VoyagerDatabaseSeeder
  
     Illuminate\Contracts\Container\BindingResolutionException 
  
    Target class [Database\Seeders\VoyagerDatabaseSeeder] does not exist.
  
    at vendor/laravel/framework/src/Illuminate/Container/Container.php:835
      831▕ 
      832▕         try {
      833▕             $reflector = new ReflectionClass($concrete);
      834▕         } catch (ReflectionException $e) {
    ➜ 835▕             throw new BindingResolutionException(&quot;Target class [$concrete] does not exist.&quot;, 0, $e);
      836▕         }
      837▕ 
      838▕         // If the type is not instantiable, the developer is attempting to resolve
      839▕         // an abstract type such as an Interface or Abstract Class and there is
  
        +23 vendor frames 
    24  artisan:37
        Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  </code></pre>
  <p>----------- Comments [ adding <code>use</code> statement ] -------------</p>
  <p>This is the voyager seeder:</p>
  <pre><code>&lt;?php
  
  use Illuminate\Database\Seeder;
  use TCG\Voyager\Traits\Seedable;
  
  class VoyagerDatabaseSeeder extends Seeder
  {
      use Seedable;
  
      protected $seedersPath = __DIR__.'/';
  
      /**
       * Run the database seeds.
       *
       * @return void
       */
      public function run()
      {
          $this-&gt;seed('DataTypesTableSeeder');
          $this-&gt;seed('DataRowsTableSeeder');
          $this-&gt;seed('MenusTableSeeder');
          $this-&gt;seed('MenuItemsTableSeeder');
          $this-&gt;seed('RolesTableSeeder');
          $this-&gt;seed('PermissionsTableSeeder');
          $this-&gt;seed('PermissionRoleTableSeeder');
          $this-&gt;seed('SettingsTableSeeder');
      }
  }
  </code></pre>