CodeIgniter Forums

Full Version: merge empty placeholders in routing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to merge routes with and without placeholders? If the placeholder is empty, the Method gets called with $1 = null (or any other placeholders)
PHP Code:
$routes->post('save', 'BlogController::SavePost');

$routes->post('save/(:any)''BlogController::SavePost/$1'); 
The first one could be removed.