I'm developing an API and in the controller the index
, store
, show
, update
and destroy
methods are all the same except for the Model that is being used.
How would you implement this?
I was thinking about a ActionRepository
where I create those methods and will resolve the model somehow. I am not sure how I can reach the model though..
Really would appreciate some feedback on this ;)!