Route::set('category', 'category/date/<id>(/<year>)', array('id' => '[0-9]+', 'year' => '[0-9]+'))
->defaults(array(
'controller' => 'category',
'action' => 'date',
));
Is there any cap for parameters on a kohana 3.2 route?
I've implemented this route in my bootstrap but everytime I try to pass the year value I get a 404 error!
Passing of the ID alone just works fine.
Am i missing anything?
This is the controller action for handling this route:
public function action_date() {
$id = $this->request->param('id');
$year = $this->request->param('year');
if(!isset($year) && $year == ""){
$year = date("Y", time());
}
//Do fancy stuff here... and hand it to the view!
}