DEV Community

mitchelln11
mitchelln11

Posted on

Proper Folder Structure with Dynamic Methods?

If I have dynamic methods that could be used on several Controllers, where should those go?

Is this a possibility? Is it the wrong way to go about folder/file structure?

Ex:



-ParkController
--with FetchParkApiMethod() inside file

-TrailController
--with FetchTrailApiMethod() inside file

--OR--

-ParkController
-TrailController

-HelperFolder
--FetchDynamicApiMethod() which could be referenced in the Park or Trail Controllers.

Top comments (0)