mardi 12 novembre 2019

Opinion needed regarding Laravel

I am fairly new to Laravel. So far I am loving the framework and I am trying to learn the best practices as much as possible. I have a question here I need your expert opinion. I am creating a Reporting Interface. I have separate controller for each type of Report. Each Controller have functions with similar names like (generate, ajax and view). These functions are different in each report by functionality. But I have some similar functions like save_report(that should save report as json on S3) or get_report. I may have more functions like these. I am not sure what is the best way to save these functions. Should I create a Main Report controller that should contain all these functions and then use them or should I create a Model or Trait or is there a better way to do it ?

Please let me know if something is wrong in my initial approach

Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire