How can I do this in laravel?

I have a game, now it is made in the form of a controller. It receives requests via the api and returns the data. The game has a few settings(time, number of rounds), they are now made in the config. And now I need to make 5 different types of this game, i.e. all the functionality is preserved, but changing only the configuration settings and therefore the path for the API. So what is the best way to organize?
June 14th 19 at 20:59
2 answers
June 14th 19 at 21:01
the same config
June 14th 19 at 21:03
You can create a configuration class (singleton), register it in the container of Lara and depending on which game is to create a setting object with the data. The controllers use this object.

Find more questions by tags Laravel