Laravel excel get total number of rows before import
问题 Straight forward question. How does one get the total number of rows in a spreadsheet with laravel-excel? I now have a working counter of how many rows have been processed (in the CompanyImport file), but I need the total number of rows before I start adding the rows to the database. The sheet I'm importing is almost 1M rows, so I am trying to create a progress bar. My import: public function model(array $row) { # Counter ++$this->currentRow; # Dont create or validate on empty rows # Bad