title: Cakephp- missing view error
body: <p>I am working on creating a UI for a database using cakephp. I am very new to cakephp so I am a little stuck. I have successfully installed cakephp, connected it to the database. I have created the model, controller and view based on tutorials but when I try to load this page localhost/app this is the error I get
  Any help will be highly appreciated.</p>
  
  <p>This is the path to my controller: app/controller/OutagesController.php model: app/model/Outage.php view: app/View/Outages/index.ctp and my code is below
   Also, Am I loading the right URL?
  Thanks in advance
  Tayo6.</p>
  
  <pre><code>enter code here
  Error message:
  Missing View
  ERROR: THE VIEW FOR APPCONTROLLER::INDEX() WAS NOT FOUND.
  ERROR: CONFIRM YOU HAVE CREATED THE FILE:         /USERS/ESTHER.AGBAJI/SITES/CAKE/APP/VIEW/APP/INDEX.CTP
  Notice: If you want to customize this error message, create     app/View/Errors/missing_view.ctp
  Stack Trace
      CORE/Cake/View/View.php line 468 → View-&gt;_getViewFileName(null)
      CORE/Cake/Controller/Controller.php line 948 → View-&gt;render(null, null)
      CORE/Cake/Routing/Dispatcher.php line 194 → Controller-&gt;render()
      CORE/Cake/Routing/Dispatcher.php line 162 → Dispatcher-&gt;_invoke(AppController, CakeRequest, CakeResponse)
      APP/webroot/index.php line 110 → Dispatcher-&gt;dispatch(CakeRequest, CakeResponse)
  APP/index.php line 19 → require(string)
  
  
  MODEL CLASS (Outage.php)
  &lt;?php
  
  
  class Outage extends AppModel {
      var $name = 'Outages';
  }
  
  var $validate = array(
  'id' =&gt; array(
  'rule' =&gt; 'notEmpty'),
  
  'start_date' =&gt; array(
  'rule'=&gt;'date'
  'allowEmpty' =&gt; true),
  
  'end_date' =&gt; array(
  
  'allowEmpty' =&gt; true),
  
  'application' =&gt; array(
  
  'allowEmpty' =&gt; true),
  
  'environment' =&gt; array(
  
  'allowEmpty' =&gt; true),
  
  'business_impact' =&gt; array(
  'allowEmpty' =&gt; true),
  
  'notified_by' =&gt; array(
  'allowEmpty' =&gt; true),
  
  'details' =&gt; array(
  'allowEmpty' =&gt; true),
  
  'severity' =&gt; array(
  'rule' =&gt; 'notEmpty'),
  
  'state' =&gt; array(
  'allowEmpty' =&gt; true),
  
  'resolved' =&gt; array(
  'rule' =&gt; 'notEmpty')
  
  'jira' =&gt; array(
  
  'allowEmpty' =&gt; true)
  
  );
  
   ?&gt;
  
  CONTROLLER CLASS (OutagesController.php)
  
  &lt;?php
  
  class OutagesController extends AppController {
  
      var $name = 'Outages';
      var $helpers = array('Html', 'Ajax', 'Javascript');
     function index() {
  
      $this-&gt;set('outages', $this-&gt;Outage-&gt;find('all'));
      }
      function view($id = null) 
      {
      $this-&gt;Outage-&gt;id = $id;
      $this-&gt;set('outage', $this-&gt;Outage-&gt;read());
      print_r($this-&gt;viewVars);
      }
      $this-&gt;Outages-&gt;set($this-&gt;request-&gt;data);
  
  }
  
  ?&gt;
  VIEW (index.ctp)
  
   &lt;h2&gt;Outages&lt;/h2&gt;
  
  &lt;table&gt;
      &lt;tr&gt;
  
          &lt;th&gt;Id&lt;/th&gt;
          &lt;th&gt;Start date&lt;/th&gt;
          &lt;th&gt;End date&lt;/th&gt;
          &lt;th&gt;Application&lt;/th&gt;
          &lt;th&gt;Environment&lt;/th&gt;
          &lt;th&gt;Business impact&lt;/th&gt;
          &lt;th&gt;Notified by&lt;/th&gt;
          &lt;th&gt;Details&lt;/th&gt;
          &lt;th&gt;Severity&lt;/th&gt;
          &lt;th&gt;State&lt;/th&gt;
          &lt;th&gt;Resolved&lt;/th&gt;
          &lt;th&gt;Jira&lt;/th&gt;
  
      &lt;/tr&gt;
  
   &lt;?php foreach ($outages as $outage: ?&gt;
  
      &lt;tr&gt;
          &lt;td&gt;&lt;?php&gt; echo $outage['Outage']['id']?&gt;&lt;/td&gt;
  
          &lt;td&gt;
          &lt;?php&gt; echo $html-&gt;link(($outage['Outage']['start_date'],
          array('controller'=&gt; 'outages', 'action'=&gt; 'view', $outage['Outage']['id']));?&gt;
          &lt;/td&gt;
  
          &lt;td&gt;&lt;?php echo $outage['Outage']['end_date']; ?&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
   &lt;?php endforeach; ?&gt;
  &lt;/table&gt;    
  </code></pre>
  
  <p>Thank you so much for your useful responses. I am now loading it the right way, using localhost/outages but I get this error message: Not Found The requested URL /outages was not found on this server. I have gone through my files and made sure they are in the right places. Tayo6 </p>