Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

validate columns laravel excel

public function import()
{
  $columns = (new HeadingRowImport)->toArray('users.xlsx');

  if (isset($column['firstname']) && isset($column['lastname']) &&  isset($column['username'])) {
    // columns found - put your code here
  }else{
    // columns not all found, handle error here
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #validate #columns #laravel #excel
ADD COMMENT
Topic
Name
9+4 =