如何在Laravel中实现像ROR一样的浅层嵌套?

I want to apply such a concept in Laravel:

Shallow nesting

Adding the ‘shallow: true’ parameter to your nested resource will define routes at the base level, ‘/songs/’, for four of our RESTful routes — show, edit, update and destroy, while leaving the remaining routes — index, new, create— at the nested level. So how is this useful to us?

In my model, with artists and songs, we are now able to use the routes starting with ‘/songs/:id’ to view or modify existing songs on an individual basis. Recall that songs belong to artists, so upon creation, we still need to initialize a song with an artist relationship. However, once a song is created, it doesn’t matter to artist relationship if we would like to edit or delete it. And so, we don’t need to follow a lengthy route, such as ‘/artists/:artist_id/songs/:id/edit’ to make our changes.

Source: https://medium.com/@jaredrayjohnson1/4-things-i-learned-toying-around-with-nested-resources-in-rails-fed6d761e924