G
G
Greg Popov2016-06-09 15:46:15
Yii
Greg Popov, 2016-06-09 15:46:15

How to properly close a site in Yii2?

There is a task to make a setting for the application that would close its client part, changing everything to one stub.
How to implement this at the code level (where to read / look at examples)?
Z.Y. The closing process itself at the code level and the redirect to the stub are unclear
Thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2016-06-09
@Gregpopov

Use the catchAll application property for this,
you can read more here https://github.com/yiisoft/yii2/blob/master/docs/g...

K
Kirill Arutyunov, 2016-06-09
@arutyunov

At the very beginning of the request, you check if the request contains a cookie (or any other admin identifier), if not, then show a stub.
For this purpose, for example, on beforeRequest is suitable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question