Question: I've upgraded to Laravel 8, but my custom seeder in a subdirectory is not working. The file is at `database/seeders/tests/TestSeeder.php.`

When I run the command `php artisan db:seed --class="TestSeeder"` it return an error message:

```none
Target class [Database\Seeders\TestSeeder] does not exist.

```

**Seeder**

```php
<?php

namespace Database\Seeders\Tests;

class TestSeeder extends BaseSeeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
       // codes
    }
}

```

**composer.json**

```json
"autoload": {
    "psr-4": {
        "App\\": "app/",
        "Database\\Factories\\": "database/factories/",
        "Database\\Seeders\\": "database/seeders/",
        "Database\\Seeders\\Tests\\": "database/seeders/tests/"
    }
},

```

Answer: 
Laravel assumes you are running a seeder from the `Database\Seeders\DatabaseSeeder` class. If you provide an unqualified class name such as `TestSeeder`, it will assume you mean the `Database\Seeders\TestSeeder` class.

So, you should specify the fully qualified class name.

```sh
php artisan db:seed --class="Database\\Seeders\\Tests\\TestSeeder"

```
No need to worry about the sub folder, no need to mention it in the command,

1. Just run the `composer dump-autoload`
2. Then run the `php artisan db:seed --class="TestSeeder"` command

This will work fine.