php artisan make factory
snippet in php

php artisan make factory

user9463

php artisan make:factory AddressFactory --model="App\\Address"

add factory data laravel

user5682

For Laravel version 7.* and less
factory(App\User::class, 3)->make();

Use create method to persist them to the database:
factory(App\User::class, 3)->create();