You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Schema::connection('sqlite_product')->create('products', function (Blueprint$table) {
$table->tinyIncrements('id')->index();
$table->string('name');
$table->unsignedSmallInteger('price');
$table->boolean('is_public')->default(true);
}
After php artisan migrate, and then php artisan make:populated-factory Models\\Product\\Product, there was a message Populated "ProductFactory" factory for "Product" model has been created successfully!
I found that the FactoryGenerator class use the default DB connection to generate factory instead of the model's connection, so I open a PR #17 to fix it.
Hi, this is my first time using this package, and it generated a factory which return an empty array.
The Product model:
The migration:
After
php artisan migrate
, and thenphp artisan make:populated-factory Models\\Product\\Product
, there was a messagePopulated "ProductFactory" factory for "Product" model has been created successfully!
But the ProductFactory return an empty array
I was hoping to generate something like
I don't know why, my Laravel Framework is 7.19.0, please help, thank you.
The text was updated successfully, but these errors were encountered: