DEV Community

loading...

Proper Folder Structure with Dynamic Methods?

mitchelln11 profile image mitchelln11 ・1 min read

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.

Discussion (0)

Forem Open with the Forem app