Answers for "laravel nested resources example"

PHP
1

nested resources laravel

Sometimes you may need to define routes to a nested resource. 
For example, a photo resource may have multiple comments that may be
attached to the photo. To nest the resource controllers, 
you may use "dot" notation in your route declaration:

Route::resource('photos.comments', PhotoCommentController::class);
//return Route :
/photos/{photo}/comments/{comment}
Posted by: Guest on July-24-2021

Browse Popular Code Answers by Language