title: How do I initialize my custom joomla 2.5 model?
body: <p>Okay so I've been following the joomla 2.5 tutorial <a href="https://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_6_-_Adding_Backend_Actions" rel="nofollow noreferrer">here</a> and I've managed to make a non faulty initial component.</p>
  
  <p>But I'm wondering how do I import extra classes into the framework?</p>
  
  <p>I have a model class called <b>auth.php</b></p>
  
  <pre><code>// No direct access to this file
  defined('_JEXEC') or die('Restricted access');
  
  // import Joomla modelitem library
  jimport('joomla.application.component.modelitem');
  
  /**
   * Auth Model
   */
  class AutoBaseModelAuth extends JModelItem
  {
      function detail()
      {   
          echo "this is test";
      }
  }
  </code></pre>
  
  <p>Located in C:/xampp/htdocs/com_autobase/model/auth.php</p>
  
  <p><a href="https://i.stack.imgur.com/CmUm3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CmUm3.png" alt="xampp"></a><br>
  <sub>(source: <a href="http://iforce.co.nz/i/p5m1gjxh.jpx.png" rel="nofollow noreferrer">iforce.co.nz</a>)</sub>  </p>
  
  <p>And my view...</p>
  
  <pre><code>// No direct access to this file
  defined('_JEXEC') or die('Restricted access');
  
  // import Joomla view library
  jimport('joomla.application.component.view');
  
  /**
   * HTML View class for the AutoBase Component
  */
  class AutoBaseViewAutoBase extends JView
  {
      // Overwriting JView display method
      function display($tpl = null) 
      {       
          $db     =&amp; JFactory::getDBO();
          //request the auth model
          $model  =&amp; $this-&gt;getModel('auth');
          $items =&amp; $model-&gt;detail();
      }
  }
  </code></pre>
  
  <p>But I keep getting this error <b>obliviously because it hasn't been imported yet... and I've been on about 5 different websites trying to find out how Joomla imports new models</b>. </p>
  
  <pre><code>Notice: Undefined index: auth in C:\xampp\htdocs\libraries\joomla\application\component\view.php on line 413
  </code></pre>
  
  <p>So can someone please explain how models are initialized in joomla? and what I'm doing wrong.. thanks!</p>