Route Model Binding - optional RouteKeyName

Posted 1 year ago by andyg1

On my front-end I am using the slug field to access the objects e.g.

and have set it using the getRouteKeyName() method.

On my admin side of the site, I am building the CRUD pages for all these things. I wanted my URLs to be the simple ones e.g.


But the system is still expecting to access the resource from the slug, not the id.

Is it possible to optionally override this so I don't have the slug-ified URLs for my admin section?

(I should state that I am using resource controllers...) Thanks

Please sign in or create an account to participate in this conversation.