title: CakePHP: Error: The view for TasksController::index() was not found
body: <p>I  use CakePHP 2.5.5 . My project in this directory: C:\xampp\htdocs\vy\cakephp-2.5.5 . My project directory layout:<br/>
  <img src="https://i.stack.imgur.com/g4WGT.png" alt="enter image description here"></p>
  
  <p><br/><br/>I have been created file <em>C:\xampp\htdocs\vy\cakephp-2.5.5\app\Model\task.php</em> (<strong>Model</strong>)with content:</p>
  
  <pre><code>&lt;?php
  
  class Task extends AppModel
  {
      var $name = 'Task';
  }
  
  ?&gt;
  </code></pre>
  
  <p><br/><br/>I have been created file <em>C:\xampp\htdocs\vy\cakephp-2.5.5\app\Controller\TasksController.php</em> (<strong>Controller</strong>) with content:</p>
  
  <pre><code>&lt;?php
  
  class TasksController extends AppController
  {
      var $name = 'Tasks';
  
      function index()
      {
          $this-&gt;set('tasks', $this-&gt;Task-&gt;find('all'));
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p><br/><br/>I have been created file <em>C:\xampp\htdocs\vy\cakephp-2.5.5\app\View\Task\index.ctp</em> (<strong>View</strong>) with content:</p>
  
  <pre><code>&lt;h2&gt;Tasks&lt;/h2&gt;
  &lt;?php if (empty($tasks)): ?&gt;
      There are no tasks in this list
  &lt;?php else : ?&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;th&gt;Title&lt;/th&gt;
              &lt;th&gt;Status&lt;/th&gt;
              &lt;th&gt;Created&lt;/th&gt;
              &lt;th&gt;Modified&lt;/th&gt;
              &lt;th&gt;Actions&lt;/th&gt;
          &lt;/tr&gt;
          &lt;?php foreach ($tasks as $task): ?&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;?php echo $task['Task']['title'] ?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;?php
                      if ($task['Task']['done']) echo "Done";
                      else echo "Pending";
                      ?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;?php echo $task['Task']['created'] ?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;?php if ($task['Task']['modified']) ?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;!-- actions on tasks will be added later --&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;?php endforeach; ?&gt;
      &lt;/table&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p><br/><br/>When run program, error:</p>
  
  <blockquote>
  <pre><code>Missing View
  Error: The view for TasksController::index() was not found.
  
  Error: Confirm you have created the file: C:\xampp\htdocs\vy\cakephp-2.5.5\app\View\Tasks\index.ctp
  
  Notice: If you want to customize this error message, create app\View\Errors\missing_view.ctp
  </code></pre>
  </blockquote>
  
  <p><br/>
  <img src="https://i.stack.imgur.com/YdiNw.png" alt="enter image description here"></p>
  
  <p>How to repair above application? Thank you!</p>