Answer the question
In order to leave comments, you need to log in
Why does Yii2 escape characters in url?
Hello.
Tell me why Yii2 can escape some links?
Example:
instead of ?id=18b97aa654bce41356002559 it shows ?id%5Boid%5D=18b97aa654bce41356002559. Of course the link doesn't work.
I am using mongodb.
Perhaps the problem is that mongodb uses id as an object. how to get it then?
<a href="<?= \yii\helpers\Url::to(['categories/view', 'id' => $categories['_id']]) ?>"><?= $categories['name'] ?></a>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question