At the moment I have no idea how we can change the implementation based on an HTTP request method, but we can definitely change the implementation based on the Controller. We can do that via Contextual Binding, I have actually written an article about that so here is the link dev.to/carlomigueldy/laravel-inver...
Hopefully that helps you :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What would be the approach if one wants to switch implementation at runtime ( say during a post / get request ) ?
At the moment I have no idea how we can change the implementation based on an HTTP request method, but we can definitely change the implementation based on the Controller. We can do that via Contextual Binding, I have actually written an article about that so here is the link dev.to/carlomigueldy/laravel-inver...
Hopefully that helps you :)