Closed kennethsantianez closed 3 years ago
For Laravel Framework 8.36 , this is what I did temporarily to make it work @yajra
namespace Database\Seeders;
at the top of AddressSeeder.php
composer dump-autoload
php artisan db:seed --class=AddressSeeder
instead of php artisan db:seed --class=\\AddressSeeder
The solution is not the right way since I modified the vendor source code.
Works fine for me?
art db:seed \\AddressSeeder Parsing PSA official PSGC publication (/Users/yajra/www/xxx/vendor/yajra/laravel-address/database/seeds/publication/PSGC_Publication_Dec2020.xlsx).
Another way is call it in the db class seeder.
use AddressSeeder;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
public function run()
{
$this->call(AddressSeeder::class);
...
@yajra , Calling it in the db class seeder works . Thank you!
I encountered an error when I try to execute command:
php artisan db:seed --class=\\AddressSeeder
This is the error message
Target class [\\AddressSeeder] does not exist
System details