We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharing a solution here for all those who attempt to use this package to import CSV or XLS(X) data into a JSON database field:
Use Case: Import cell values (e.g. address details) from CSV or XLS files into destination JSON columns.
Solution: Wrap the array mapping between the database JSON child node and the CSV / XLS column within the following function:
response()->json([ Add array here ])->getData()
Place address code example:
public function model(array $row) { return new Client([ 'name' => $row['client'], 'location' => response()->json([ 'address' => $row['address'], 'street'=> $row['street'], 'house_no'=> $row['house_no'], 'postcode'=> $row['postcode'], 'city'=> $row['city'], 'county'=> $row['county'], 'country'=> $row['country'] ])->getData(), ]);
@anaseqal Would be great to have this somewhere in the readme / documentation as this might be useful for others too.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sharing a solution here for all those who attempt to use this package to import CSV or XLS(X) data into a JSON database field:
Use Case:
Import cell values (e.g. address details) from CSV or XLS files into destination JSON columns.
Solution:
Wrap the array mapping between the database JSON child node and the CSV / XLS column within the following function:
Place address code example:
@anaseqal
Would be great to have this somewhere in the readme / documentation as this might be useful for others too.
The text was updated successfully, but these errors were encountered: