404 Error when trying to find view file

64 views Asked by At

I've started learning Kohana to learn more about MVC Frameworks. I'm having a problem trying to access one of my views despite it working fine for another view in the same directory.

The one that works is this:

 public function action_index()
   {
     $this->template->content = View::factory('pages/index');
   }

So going to / on my server takes me to the index.php file.

The one that doesn't work is this:

 public function action_edit_account()
   {
     $this->template->content = View::factory('pages/edit_account');
   }

If I go to /edit_account it takes me to a 404 page despite there being a file called edit_account.php in my /views/pages/ directory.

I've probably made a pretty stupid mistake but Kohana doesn't have the best documentation so any help is greatly appreciated.

Thanks!

0

There are 0 answers