Laravel Faker - What's the difference between create and make Laravel Faker - What's the difference between create and make laravel laravel

Laravel Faker - What's the difference between create and make


create persists to the database while make just creates a new instance of the model.

The create method not only creates the model instances but also saves them to the database using Eloquent's save method

https://laravel.com/docs/5.4/database-testing#using-factories

If you'd like to see the source code differences between make and create you can see them in src/Illuminate/Database/Eloquent/FactoryBuilder.php


Laravel create method is created the model instance and save data in the database.Make function has created the instance of the class.

click here for more info