You can just use Eloquent::insert()
.
For example:
$data = [
['name'=>'Coder 1', 'rep'=>'4096'],
['name'=>'Coder 2', 'rep'=>'2048'],
//...
];
Coder::insert($data);
More Related Contents:
- Property Property Property [title] does not exist on this collection instance does not exist on this collection instance does not exist on this collection instance
- Automatically deleting related rows in Laravel (Eloquent ORM)
- Get Specific Columns Using “With()” Function in Laravel Eloquent
- How do I get the query builder to output its raw SQL query as a string?
- Laravel Check If Related Model Exists
- How can I convert many statement mysql to laravel eloquent?
- Eloquent ORM Code Hinting in PhpStorm
- Laravel, sync() – how to sync an array and also pass additional pivot fields?
- Laravel Model with Two Primary Keys update [duplicate]
- Laravel eager loading with limit
- Laravel OrderBy relationship count
- Laravel Eloquent: How to order results of related models?
- Laravel 4: how to “order by” using Eloquent ORM [duplicate]
- How to set a default attribute value for a Laravel / Eloquent model?
- Laravel – Database, Table and Column Naming Conventions?
- Order By before Group By using Eloquent (Laravel)
- How to Make Laravel Eloquent “IN” Query?
- How to Merge Two Eloquent Collections?
- How to create a subquery using Laravel Eloquent?
- Eloquent model mass update
- Difference between Eloquent\Model::get() and all()
- Laravel Eloquent sort by relation table column
- Laravel 4.1: How to paginate eloquent eager relationship?
- Eloquent many-to-many-to-many – how to load distant relation easily
- Laravel Eloquent: How to get only certain columns from joined tables
- Find or Create with Eloquent
- How to get last insert id in Eloquent ORM laravel
- Laravel Many to many self referencing table only works one way
- Merge ‘with’ and ‘whereHas’ in Laravel 5
- Laravel Eloquent update just if changes have been made