A
A
AlexSer2018-08-05 10:35:42
Yii
AlexSer, 2018-08-05 10:35:42

How to store data in Yii2 on a page?

Tell me about the Yii2 framework. Whether it is possible to organize "memorization" of the data. Let's say I'm doing a search in the gridview
and if I update everything is reset. How to organize memorization, even if I update the system will display the same data.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2018-08-06
@AlexSer

framework

with what fright "a" began to be read as "ae"? framework
easily
Let's say I'm doing a search in the gridview
and if I update everything is reset. How to organize memorization, even if I update the system will display the same data.

That's how it usually works. Since any filter in the gridView generates a get request, information about the selected filters is already stored in it. So refreshing the page will cause the same request to be resubmitted and as a result the system will display the same data. If you don't, then you need to look at what you broke.

A
Artem, 2018-08-05
@proudmore

It works there out of the box. The search query is stored in the GET parameters of the page. When you refresh, the query doesn't change.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question