laravel eloquent difference create and insert 1

laravel eloquent difference create and insert

create() is a function from Eloquent, insert() - Query Builder.

Here is what the above code is Doing:
1. We’re creating a new instance of the User model.
2. We’re setting the name and email properties on the model.
3. We’re saving the model to the database.

Similar Posts