laravel-eloquent-hashids icon indicating copy to clipboard operation
laravel-eloquent-hashids copied to clipboard

add routeKeyName to README

Open hanspagel opened this issue 8 years ago • 1 comments

thanks for this tiny little helper. maybe you could add this little snippet to your readme:

public function getRouteKeyName() {
    return 'uid';
}

this ensures implicit binding, find, first etc. work with uid instead of id. seems pretty useful for users of this package. :)

hanspagel avatar Sep 21 '16 22:09 hanspagel

I made another trait just to add this to all my models, but it would be great to have it by default.

Just made a PR. What do you think, @naabster?

joelcuevas avatar Nov 01 '16 00:11 joelcuevas