To use a controller inside of a subdirectory inside of Kohana, this is how you do it:
- Create a subdirectory inside of the controllers folder (.e.g ‘forms’)
- create a controller file and name the class inside of it appropriately (e.g. ‘contactus.php’ and ‘Class Controller_forms_contactus extends Controller_Template’)
- create the correct route in your bootstrap.php file. Place it above any other routes:
Route::set('forms/contactus', 'forms/(/(/))') ->defaults(array( 'directory' => 'forms', 'controller' => 'contactus', 'action' => 'index', ));