Hi Dear Friends,
In this post We would like to share infinity knowladge My Good experience and Best solution For .
Try this it will help you and for more information click here: Laravel Examples.
We hope it can help you...
In this post We would like to share infinity knowladge My Good experience and Best solution For .
Laravel Examples
If you want to create multiple records at time using laravel eloquent, then you can do it using "insert()" of laravel eloquent. insert() will provide to bulk insert records. insert() take array argument. You can simply give array then it will create single rows of table, if you pass multi dimensional array, then will create multiple records.
Here, you can learn to insert several records at time, as bellow i give you syntax of insert().
Syntax:
DB::table('pakainfo')->insert(array(array(...),array(...),array(...),.....));
As above syntax, you can see how to pass multiple records for insert, So, let's see bellow example.
Example:
DB::table('items')->insert(array(array('title'=>'Test', 'description'=>'Test Description'),array('title'=>'Test 2', 'description'=>'Test Description 2'),array('title'=>'Test 3', 'description'=>'Test Description 3'),));
Read :
I hope you like this Post, Please feel free to comment below, your Any Idea, suggestion and problems if you face - I am here to Resolve your Any problems.We hope it can help you...
No comments :
Post a Comment