Closed pabloelcolombiano closed 2 years ago
When setting the display field of a factory's table only, the factory could accept a simple string as parameter.
Example 1:
CountryFactory::make(['name' => 'Portugal'])->getEntity();
would also be written:
CountryFactory::make('Portugal')->getEntity();
Example 2:
CityFactory::make()->with('Country', ['name' => 'Portugal'])->getEntity();
CityFactory::make()->with('Country', 'Portugal')->getEntity();
The risk behind this is if the display field of a table changes, which:
When setting the display field of a factory's table only, the factory could accept a simple string as parameter.
Example 1:
would also be written:
Example 2:
would also be written:
The risk behind this is if the display field of a table changes, which: