In Yii2, I have manually added a new page backend/views/site/new.php.
Then I have given a link in the page backend/views/site/index.php:
<a href="<?= Yii::$app->urlManager->createUrl('site/new'); ?>"> New</a>
When I click the link it shows:
Not Found (#404)
What's the issue here?
Create action in
SiteController.phplike belowAnd also create
new.phpfile inviews/site/new.phpAdd
Newpage link in the pagebackend/views/site/index.phplike