adminarchitect / core

AdminArchitect - Active Admin for Laravel
http://adminarchitect.com
MIT License
211 stars 66 forks source link

Export to own format #54

Closed lfiraza closed 5 years ago

lfiraza commented 5 years ago

According to the http://docs.adminarchitect.com/#/Listing/exportable?id=export-to-a-new-format Should be possible to declare new export format for resources, but this method declared in resources not working. To be honest, I don't see any code which could call the method like public function to<Format>(){} declared in modules.

But also I noted that PDF format is native supported. So, is documentation out-of-date or is it a bug?

endihunter commented 5 years ago

Hello, you're right, the basic pdf export is natively supported, but for more complex cases you'll still need to handle it on your side.

regarding new formats: I agree there is a misunderstanding in the documentation - actually you have to add new format declaration to Action service, but I've submitted an MR that allows defining exportable methods in both: actions class or module, so choose what is more convenient for you.

thanks