Hello Friends,
If you are looking to fetch request variable submitted through GET method in Symfony2. Suppose your URL :: http://www.abc.com/taxsetting/list?q=xyx
You are looking to fetch q value in your controller, please review code below
class TaxsettingController extends Controller
{
public function listAction(Request $request){
if(!empty($request->query->get('q'))){
$getData = $request->query->get('q'); // $getData will have q data
echo $getData; // This will print xyz
}
}
0 Comment(s)