kawashita's avatar

From Json to Excel

I would like to write a program using laravel to consume an api response (json) and convert it to .xlsx then download it or save it somewhere

Can someone guide me through the best approach I should take? I am thinking to use Maatwebsite Laravel Excel or I shouldn't ?

0 likes
4 replies
kawashita's avatar

Thanks a lot. I would like to make this app not via web but cli based and have it done on precise time Do you know any tutorial I can get started with in order to accomplish a simple cli app ?

grenadecx's avatar

Having it as a command line would work just the same really. If you use laravel I would assume you want to use commands for this, so you could do something like

php artisan mycommand:export

So any basic laravel tutorial would work, but instead of creating Controllers, Views etc, you could just create your command that in turn executes what you want. Take a look here:

https://laravel.com/docs/5.8/artisan#writing-commands

1 like

Please or to participate in this conversation.