Skip to content
Discussion options

You must be logged in to vote

I feel like we can opt to rely on Eloquent getRouteKey() and getRouteKeyName() when developer want to use slug/uuid based route key insteads of default $primaryKey. To do this we need to modify:

  • ID to expose $routeKey
  • Resource redirectAfterCreate() and redirectAfterUpdate() need to be updated.
  • All pages controllers (Inertia) should query based on routeKeyName() as "key" and return primaryKey value to response as "props".

At the moment we 100% rely on getKey() but Laravel\Nova\Resource does uses Illuminate\Http\Resources\DelegatesToResource

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dmason30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Feature Request blocked
2 participants
Converted from issue

This discussion was converted from issue #5067 on November 17, 2022 02:55.