yii2 gives error 404 but the file exists?

35 Views Asked by At

so i am building a youtube clone with php and yii2 right now but when i created my own Controller and try accesing it i get a 404 Error. My controller (backend/controllers):

<?php

namespace backend\controllers;
use yii\web\Controller;

class HelloController extends Controller {
    public function actionIndex() {
        return $this->render('index');
    }

}

my index.php (backend/views/hello):

<?php
 echo "Hello World!";
?>
0

There are 0 best solutions below