A
A
Alexander Sinitsyn2015-08-27 21:08:59
Kohana
Alexander Sinitsyn, 2015-08-27 21:08:59

How to get to the controller /dir1/dir2/controller(/action(/id))?

It turns out that directory = "dir1/dir2". How to register it in the route?
I'm slowing down something... :)
---
Controller class Controller_Dir1_Dir2_ControllerName
---
It looks like I'm not the only one slowing down %)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Belyaev, 2015-08-27
@ib2

Route::set('routename', 'foo/bar/...')->defaults(array(
  'directory'  => 'Dir1/Dir2',
  'controller'  => 'ControllerName'
));

A
Alexander Sinitsyn, 2015-08-27
@a_u_sinitsin

In general, he spat on the slash separators and replaced them with underscores.
Route::set('tadatada', '< directory >/< controller >(/< action >(/< id >))', array('directory' => 'tadatada_.*'))
->defaults(array (
'action' => 'index',
));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question