I'm using FuelPHP to create a simple web app with a photo gallery. All photos must belong to a gallery, and may only belong to one gallery. Given that a photo must exist as a component of a gallery, I want my URL structure to look something like the following:
To index all photos in gallery #4
/admin/galleries/4/photos
To edit photo 17 in gallery 2
/admin/galleries/2/photos/edit/17
...etc. Pretty obvious pattern. I added the following line to my routes.php
to kick things off:
admin/galleries/:gid/photos' => array('admin/photos/index')
...but visiting /admin/galleries/4/photos
gives me a 404. Thoughts? Is there another routing pattern I should be using?