Skip to content

Conversation

@tiag00liveira
Copy link

try {
   $checkHeader = ['NAME','CODE'];
   $csv = $this->csvImport($pathFile, true, ',', '"', '\\',$checkHeader);
   foreach ($csv as $row)
   {
   }
} catch (\Exception $e) {
        throw new \RuntimeException($e->getMessage());
}

/*
If there is the NAME and CODE header will be released an exception
ex: Not Found Header CODE
*/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant