laravel / horizon

Dashboard and code-driven configuration for Laravel queues.
https://laravel.com/docs/horizon
MIT License
3.84k stars 645 forks source link

Fix error when loading monitoried tags page(#1478) #1485

Closed therobfonz closed 1 month ago

therobfonz commented 1 month ago

This PR fixes an issue when viewing the show page of a monitored tag

Too few arguments to function Laravel\\Horizon\\Http\\Controllers\\MonitoringController::paginate(), 1 passed in 

The underlying cause of this error is MonitoringController::paginate() was expecting the request, and a $tag parameter. Since the non-API routes are defined in Vue Router, Laravel is not resolving the {tag} parameter in the controller with route model binding.

In light of that, I added tag as a querystring parameter as well so we can grab the value with $request->query('tag').

I am not sure this is the best way to fix this, but after trying a few different ways, this seemed like the only solution.