-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MVC - add exportCsv() to ApiControllerBase to easily stream recordset…
…s as csv files to the client and add asRecordSet() to ArrayField to be able to use this easily. Sometimes it's practical to be able to use tools like excel to modify data, in order to do this we need an import and an export option in the model. The export seems to be quite easy, controllers and forms can easily use this with a construction like: $this->exportCsv($mymodel->myarray->asRecordSet()); The import is likely a bit more challenging.
- Loading branch information
1 parent
edf756e
commit a8d1a84
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters