User::insert(array(
array(
'name' => 'a',
'age' => 1
),
array(
'name' => 'b',
'age' => 2
),
array(
'name' => 'c',
'age' => 3
),
array(
'name' => 'd',
'age' => 4
)
));
Your arrays must containe data for a single record, not a row.
okursan said:
User::insert(array( array( 'name' => 'a', 'age' => 1 ), array( 'name' => 'b', 'age' => 2 ), array( 'name' => 'c', 'age' => 3 ), array( 'name' => 'd', 'age' => 4 ) ));
Your arrays must containe data for a single record, not a row.
There is no "insert" for Eloquent Model. You're WRONG!
tucq88 said:
okursan said:
User::insert(array( array( 'name' => 'a', 'age' => 1 ), array( 'name' => 'b', 'age' => 2 ), array( 'name' => 'c', 'age' => 3 ), array( 'name' => 'd', 'age' => 4 ) ));
Your arrays must containe data for a single record, not a row.
There is no "insert" for Eloquent Model. You're WRONG!
There certainly is a insert method for the eloquent model.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community