cakephpcakephp-3.0cakephp-3.4cakephp-3.3

Query parameter string in cakePHP 3.4


I'm getting null query parameter string even though passing query parameter string like this login?redirect=%2Farticles%2Fadd. I have tried with $this->request->getQuery('redirect'); and $this->request->query('redirect'); but no luck. Does anyone have any idea that where it would be wrong?


Solution

  • Looks like you are not setup your URL Route properly in your config/routes.php file. When you are interested to pass any route parameter to your controller action you should configure your route proper way. Although your question is not written detailedly.

    I hope you will get much more information from this articles.

    Passing Parameters to Action