-
-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access nested inputs with dot notation in find
option of @can
#1216
#1216
Conversation
This looks really clean, good work.
This kind of breakage is fine in a new minor version. What do you think about adding an explicit exception for that case? It seems like it is distinct from not finding a model. |
Good idea. Just a generic server exception? throw new \Exception("Undefined index. Could not find $find"); |
I think that the onus is on the developer, they should just make the argument required. We usually utilize the |
Updated |
Nicely done, thank you |
find
option of @can
find
option of @can
find
option of @can
#1216
Resolves #1162
Changes
The
find
method of the can directive now uses Arr::get, to search the model. This allows to pass a string in a dot notation likedata.foo.bar
.Breaking changes
Previously it would throw an
Undefined Index Error
if the string did not map to a value. Now it will throw aDefinitionException
.