L
L
Leonid Groshev2017-08-14 16:25:13
Yii
Leonid Groshev, 2017-08-14 16:25:13

How to output the model id in encrypted form to the front?

There is a model. I need to make sure that id's are sent to the front in encoded form.
For example, in Silex, I could beat this moment due to the Normalizeable Interface, is there something similar in yii2?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-08-14
@otezvikentiy

Do you need decryption? If not, then it can be trite
$hash = md5($model->id.$secret);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question