mardi 24 septembre 2019

What's difference between Laravel Model functions "create" and "insert"?

Laravel Model allows two functions for inserting the values to the database table. They are

Create: User::create(['id'=>1,'name'=>'stack']);

Insert: User::insert(['id'=>2,'name'=>'overflow']);

I found they perform similar operations. What's difference between them?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire