In ListingFactory.php I have something like this
return [
"reviews" => json_encode([
'user' => fake()->name(),
'body' => fake()->paragraph(),
]),
]
Additionally, in the DatabaseSeeder.php I have this at the moment
AppModelsListing::factory(10)->create();
Any assistance is greatly appreciated
The current problem is that it will always generate one instance of review. What I want is a random number of reviews in a range.
For example, right now the table column of Review will always be [{}], I want something like [{}, {}, {}] or [].