A
A
abrakadana2016-06-02 11:07:44
Yii
abrakadana, 2016-06-02 11:07:44

How to define Yii2 main page?

Hello. Can you tell me how to define Yii2 main page? for example

if(Yii::$app->request->baseUrl) {
echo 'главная';
}

Is there a special function in Yii?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-06-02
@abrakadana

There is no built-in function for such purposes. But you can write it yourself using data for example from Yii::$app->request->url and Yii::$app->homeUrl

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question