bagisto / laravel-data-faker

Creates fake data of products and customers for testing
MIT License
22 stars 23 forks source link

Call to undefined method Webkul\Product\Models\Product::product() #2

Closed topclaudy closed 4 years ago

topclaudy commented 4 years ago

php artisan db:seed --class="Webkul\DataFaker\Database\Seeders\DatabaseSeeder" results in Call to undefined method Webkul\Product\Models\Product::product()

savanajs commented 4 years ago

I solved it like this

Open the file bagisto\packages\Webkul\DataFaker\src\Database\Seeders\ProductTableDataSeeder.php

And add this configuration in the factory create

['type' => 'configurable']
factory(\Webkul\Product\Models\Product::class, $count)->create([
            'type' => 'configurable',
        ])->each(function ($product) {

It worked for me, okay.

vaishaliwebkul commented 4 years ago

@topclaudy This bug is resolved now, you could check with the latest master branch.

Thanks.