yajra / laravel-address

Philippines Regions, Provinces, Cities and Barangays Address Lookup API for Laravel.
MIT License
35 stars 17 forks source link

AddressSeeder not working #5

Closed kennethsantianez closed 3 years ago

kennethsantianez commented 3 years ago

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

kennethsantianez commented 3 years ago

For Laravel Framework 8.36 , this is what I did temporarily to make it work @yajra

image

The solution is not the right way since I modified the vendor source code.

yajra commented 3 years ago

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);
...
kennethsantianez commented 3 years ago

@yajra , Calling it in the db class seeder works . Thank you!