I am creating an API route where some endpoints have ids in the route. I was hoping to do something like the following route but I'm not sure how to get the parameter when in the Resource Controller
Route::resource('plans','api\PlanController');
Route::resource('plans/{plan_id}/days','api\PlanDayController');
Is this possible, and if so how would I best make sure the Resource Controller filters the data to the correct plan_id as specified in the route? I would like to continue using the Route::resource as this forces consistent structure into the API
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire