Closed sahamilton closed 3 years ago
As a workaround add the below to your composer.json
"autoload": {
<...>
"psr-4": {
<...>
"Ichtrojan\\Location\\Seeds\\": "vendor/ichtrojan/laravel-location/src/database/seeds/"
}
},
I followed this fix for Laravel8, it fixed the error message but then I can't run the seeder
php artisan db:seed --class=Ichtrojan\\Location\\Seeds\\LocationDatabaseSeeder
it displayed this error message
I am having the same error @ichtrojan
STEPS TO REPRODUCE Laravel 8 PHP 7.4
ERROR: Class Ichtrojan\Location\Seeds\LocationDatabaseSeeder does not exist
Run
composer dump-autoload
Using a clean install of Laravel 8 when running composer dump-autoload
Deprecation Notice: Class Ichtrojan\Location\Seeds\StatesTableSeeder located in C:/laragon/www/mapminer4/vendor/ichtrojan/laravel-location/src\database\seeds\StatesTableSeeder.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/laragon/bin/composer/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
So when the seeders are run the following error is received:
Target class [Ichtrojan\\Location\\Seeds\\LocationDatabaseSeeder] does not exist.