PHPackages                             kakposoe/laravel-csv-to-model - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. kakposoe/laravel-csv-to-model

ActiveLibrary[Database &amp; ORM](/categories/database)

kakposoe/laravel-csv-to-model
=============================

Eloquent helper to import csv data directly into a model

1.2(6y ago)1481[5 issues](https://github.com/kakposoe/laravel-csv-to-model/issues)[3 PRs](https://github.com/kakposoe/laravel-csv-to-model/pulls)MITPHP

Since Sep 23Pushed 4y ago2 watchersCompare

[ Source](https://github.com/kakposoe/laravel-csv-to-model)[ Packagist](https://packagist.org/packages/kakposoe/laravel-csv-to-model)[ Docs](https://github.com/kakposoe/laravel-csv-to-model)[ RSS](/packages/kakposoe-laravel-csv-to-model/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (6)Versions (9)Used By (0)

Laravel Csv To Model
====================

[](#laravel-csv-to-model)

Helper for Laravel Eloquent to import csv data directly into a model.

[![Build Status](https://camo.githubusercontent.com/c8db6fce1bd577d37ff32831c2a1478dd8eec46c9e2de97f1095446a7119387a/68747470733a2f2f7472617669732d63692e6f72672f6b616b706f736f652f6c61726176656c2d6373762d746f2d6d6f64656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kakposoe/laravel-csv-to-model)[![StyleCI](https://camo.githubusercontent.com/9cea65ad4cc6b542574cd1561d538c253ca940c17dca70141a5c10dbfccab558/68747470733a2f2f7374796c6563692e696f2f7265706f732f3230323734373339392f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/202747399)

Behind the scenes, the package wraps the [box/spout](https://github.com/box/spout) package to iterate the imported csv.

Installation
------------

[](#installation)

Via Composer

```
$ composer require kakposoe/laravel-csv-to-model
```

Usage
-----

[](#usage)

You must use the `CsvToModel` trait in the model you would like to import csv data:

```
