Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

insert batch in laravel

$data = [
  ['name' => 'John', 'age' => 25],
  ['name' => 'Maria', 'age' => 31],
  ['name' => 'Julia', 'age' => 55],
];
DB::table('table_name')->insert($data);
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #insert #batch #laravel
ADD COMMENT
Topic
Name
5+8 =