rest - restful controller inside controller with laravel -


i'm having designcontest website contests controller show single contest follows:

route::get('contests/(:any)', array('as' => 'contest', 'uses' => 'contests@show')); 

this create url designcontest.com/contests/123

with id of current contest shown '123' here.

user can submit entries single contest wich can delete aswell need set of routes belonging entries controller inside single contest view.

jeffrey way likes refer http://guides.rubyonrails.org/routing.html#crud-verbs-and-actions guide on how name routes. shows example on how name routes case i'm making here?

should url create new contestentry belonging contest like:

designcontest.com/contests/123/entries/new

i'm guessing approach don't know being done in case. i'm asking best url structure follow in case of controller(entries) part of controller(contests).

i think you're in right path , you're thinking of doing. take @ child nested resources on rails: http://guides.rubyonrails.org/routing.html#nested-resources, yours: /magazines/:magazine_id/ads/new.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -