Veleous left a reply on Declare Middleware Use In Route File Or Controller
Thanks @manelgavalda, I should really have checked the docs before posting.
Veleous started a new conversation Declare Middleware Use In Route File Or Controller
Is there a convention for where the middleware used should be declared, whether it be on the route or in a controller constructor?
The parameter keys will remain the same, only the values of some of the keys (1 or 2) will change and not frequently (really only if the app is working in development or production).
I had initially thought of a single varible for simplicity but some of the key values are 40+ characters making the entire variable quite long and a little difficult to read which is why I was considering option 2.
I have an enviromnent variable which is a URI and contains some query parameters that can change based on the enviroment and other factors.
Would it be recommended to keep everything in one environment variable, or have the changable values as separate environtment variables which can then be used to compose the final URI?
URI="https://%s.domain.com?key1=%s&key2=%s..." KEY_1="fuhsf7w78gww08hb" KEY_2="eofubw97b847fs8f0"
There is a composer package available which provides support for this feature should it be required though.
Veleous started a new conversation BindingResolutionException When Resolving A ServiceProvider
I'm attempting to create a service provider which will inject a dependency into a controller, however, I encounter a
BindingResolutionException when attempting to access the controller.
I created a question for this on StackOverflow