I use Laravel Excel and I want to load columns separately, like this:
$rows = Excel::selectSheetsByIndex(0)->load($fileName);
$a = $rows->select($column1)->get();
$b = $rows->select($column2)->get();
Where $column1 and column2 are array with the names of columns I want to get.
In my $a i have the column1 but in my $b I have the column1 AND the column2. How to just have the column2 in $b without realoding the Excel file?
EDIT : The solution is to replace:
$a = $rows->select($column1)->get();
by :
$a = $rows->get($column1);