Support the ongoing development of Laravel.io →
Configuration Requests Architecture
Last updated 2 years ago.
0

Hi Lc,

The resource route does not do any more than that, if you need to add more than the 8 defined routes by the resource route you have to manually define it. The catch is you need to define it before Route::resource(), but i see you do not want to define supplemental routes, in that case:

You can always append Query String parameters and they're accessible within the request scope. e.g you could add ?user_id=1&project_id=3 appended to the url. Likewise, this data since it's not custom fields that are randomly generated by users, hence, we already know the properties we want to carry around, you can send them in POST via hidden field on your forms or as Query String on you GET.

Either way they will be available with in the Request. If you want to access they data of query string in the route you can access them via **Input::get('user_id')..." so on...

I hope this helps.

Thanks.

0

You sound like you want the structure of a nested resource.

Laravel - Controllers - Restful - Nested Resources

0

@lagbox reply is working and i am giving the summary. If your router changed to this

Route::resource('something.anotherthing', 'SomethingOntherThingController')

it will gives

http://<url>/somthing/{somthing_id}/anotherthing/{anotherthing_id}
Last updated 6 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

lcjury lcjury Joined 1 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.