how to specify name in laravel factory code example
Example 1: php artisan make factory
php artisan make:factory AddressFactory --model="App\\Address"
Example 2: laravel factory relations data
factory(App\User::class, 30)->create()->each(function($user) {
$entity = factory(App\Entity::class)->make();
$address = factory(App\Address::class)->create([
'entity_id' => $entity
]);
$user->entities()->save($entity);
});