Allow using LIKE
keyword with Custom Keys & Scoping
#49133
Unanswered
mahmoudmohamedramadan
asked this question in
Ideas
Replies: 1 comment 1 reply
-
Since it is already possible to use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Welcome Folks! 👋
When I was making a review of Custom Keys & Scoping section. I wrote the next code to ensure that everything was functioning properly
When I tested the first route and wrote
/without-scope-binding/users/1/posts/1
, I found that Laravel returns the name of the first user's id and the title of the first post without assuming that the first user has theposts
method, and when I tested the second route and pass/implicit-scope-binding/users/1/posts/Excepturi nemo.
Laravel gets a valid value back also, here I told to myself surely I'll not remember the exact and full name of the post's title so, I suggest here to search usingLIKE
keyword, I think that it will be a very nice to add this feature to Laravel.Important
I think that it will not be a BC because I will allow the
resolveRouteBindingQuery
method to accept the operator value with a default=
value, and I'll useLIKE
in case the type of the given field is a string.What do you think about that idea, I'm waiting for your opinion 🧐.
Beta Was this translation helpful? Give feedback.
All reactions