Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to use routing to get parameter

I want to get the "q" parameter value for urls like this:

How to do that using routing in Phalcon? I try this but not working:

$app->get("/artist?callback={callback:(.*)}&q={q:(.*)}&_={_:(.*)}", function ($q) {
    //my logic code

Inside a controller, you can use:

$q_parameter = $this->request->getQuery('q');

edited May '14

Thank you, quasipickle. I'm not using controller. I'm using micro application. So I have the solution from stackoverflow:

$app->get("/artist", function () use($app) {
    $q = $app->request->getQuery('q');
    //my logic code