@faraz73 I believe, the problem is in your test, you're passing parameters as query parameters to a GET request. The parameters are passed as an associative array to the route function.
You're trying to access the parameters using request()->get('client') instead you use query.
For example:
class ResponderFacade extends Facade
{
protected static function getFacadeAccessor()
{
dump('here we go');
dd(request()->all());
if(request()->query('client') == 'android'){
return AndroidResponses::class;
}
return VueResponses::class;
}
}
Separation of concerns is important, @faraz73. I can't give you an example of something I've not done. I have never seen a facade class that does anything in getFacadeAccessor other than return a string. Consider the purpose of a facade, map to a container binding... why would you wish to add possible confusion to that process?