Last active
August 23, 2016 23:19
-
-
Save zabbarob/b8227ac19d3f8d4bf1855ffe8a0bdf06 to your computer and use it in GitHub Desktop.
Read an Excel file with Laravel Excel (https://github.com/Maatwebsite/Laravel-Excel)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sheets = Excel::load($filename)->get(); | |
$firstSheet = $sheets->first(); | |
$header = $firstSheet->first(); | |
$data = $firstSheet->slice(1)->map(function ($row) use ($header) { | |
return $header->combine($row); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment