Route with optional param is not working |
(06-07-2016, 01:33 PM)cartalot Wrote: this doesn't make any sense. are you really saying this is your url? The delete request also takes a URL to delete temp images that don't have ID yet. BTW the solution was PHP Code: $route["admin/product/image/?(:num)?"]["delete"] = "product/deleteImage/$1"; to make parameter optional. even though the functions is defined as PHP Code: public function deleteImage($imageId=0) {
Harpreet Bhatia
Web Developer / Analyst Technical Reviewer - "Codeigniter 2 Cookbook" |
Messages In This Thread |
Route with optional param is not working - by harpreet - 06-06-2016, 09:29 PM
RE: Route with optional param is not working - by cartalot - 06-07-2016, 01:33 PM
RE: Route with optional param is not working - by harpreet - 06-07-2016, 10:26 PM
RE: Route with optional param is not working - by kilishan - 06-07-2016, 06:07 PM
RE: Route with optional param is not working - by harpreet - 06-07-2016, 10:43 PM
|