Answer the question
In order to leave comments, you need to log in
How to pass url as a parameter in Yii2?
Hello
The situation is this: there is a site in which a bunch of pages of the 1st, 2nd, 3rd level and all the pages are in the database.
Therefore, you need to get the full url and pass it to the controller as a parameter
Question: how to do this on yii2 (search for special results did not give)
PS You can use $_SERVER['REQUEST_URI'] - parse in the controller, but maybe there is a more adequate option?
Thanks in advance
Answer the question
In order to leave comments, you need to log in
Maybe this will suit you:
[
'catchAll' => 'site/index',
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question