Skip to content

Instantly share code, notes, and snippets.

@etiennemarais

etiennemarais/example.php

Last active Oct 27, 2016
Embed
What would you like to do?
Gets the rows from a csv file in laravel
<?php
/*
* Gets the rows from a csv file in laravel. via https://github.com/johnmarkmassey :+1:
*/
$rows = array_map('str_getcsv', file(app_path('database/migrations/test_data.csv')));
var_dump($rows);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment