so I have the following controller function to add events:
public function add($id = null, $year = null, $month = null, $day = null, $service_id = null, $project_id = null){
...
}
In some cases I only need to do id and service_id or project_id and skip year, month and day. I tried passing parameters as empty strings or zeros as shown below, but none of them worked.
echo $this->Html->link('Add event', array(
'controller' => 'events',
'action' => 'add',
25, null, null, null, 3, 54
))
Any help is greatly appreciated.
source
share