Support the ongoing development of →
Input Eloquent Forms
Last updated 7 months ago.

Should someone else come across this, the answer is "nested resources". In my case, I solved it by doing this:

Route::resource('clients.contacts', 'ContactsController', array('except' => array('create', 'index', 'show')));

A simple php artisan routes-call reveals that the routes created for the ContactsController should contain two parameters in the url, one client id and one contact id (where applicable). Handling contacts is now a cinch in the controller and can be done in the proper RESTful way.


Sign in to participate in this thread!


Your banner here too?

fredrkr fredrkr Joined 11 Jul 2014


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

Your logo here?

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

© 2022 - All rights reserved.