input('provider'); $query = $request->input('q'); $provider = Search::providerDetails($requestprovider); if($provider->type == 'external') { return redirect($provider->url.'?'.$provider->var.'='.urlencode($query)); } else { // get results } //print_r($provider); } }