Welcome Guest, Not a member yet? Register   Sign In
How do I send the second segment as id to update method?
#1

I 'think' I need to pass a different segment to the UPDATE method on the model in an attempt to update a resource (RESTFully).

According to the docs:
Code:
Change the Placeholder Used

$routes->resource('photos', ['placeholder' => '(:num)']);

// Generates routes like:
$routes->get('photos/(:num)', 'Photos::show/$1');

But in my case the resource ('photos') is dynamic, so I need to pass segment AFTER the first 'segment' as I guess CI sees it as a segment because it's dynamic.

Are there ANY mechanisms for working with the segment in the route, and what I pass to the method – update in this case?
Reply


Messages In This Thread
How do I send the second segment as id to update method? - by blaasvaer - 12-15-2020, 05:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB