Replies: 2 comments 4 replies
-
Hi @nikhiltri! This is a great suggestion, both because it is indeed not currently implemented and because the approach you propose makes sense. We can add a new property in the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @nikhiltri, Curious to know if you have implemented this on your end. Would it be OK if I submitted a PR for this? |
Beta Was this translation helpful? Give feedback.
4 replies
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.
-
As part of upgrading to the latest version of Twill we're working on cleaning up our repositories to use Twill's new generalized browser functionality. One thing we're finding is that this functionality only works when the model uses a proper relation, e.g., the
updateBrowser
method looks for a model method that uses an Eloquent relationship that it can run async()
on.For some of our model relationships, we use the HasRelated behavior so we don't have to build out DB tables for something minor. But I'm not sure this new browser functionality can work with relationships that use HasRelated.
I'm not sure what a good solution might be. Perhaps in the array passed in the definition in the
$browser
array, we can say whether the regular browser methods should be called, or the related methods? E.g.,updateBrowser
vs.updateRelatedBrowser
, andgetFormFieldsForBrowser
vs.getFormFieldsForRelatedBrowser
.Is this something you've already accounted for in some way? Or is this something new?
Beta Was this translation helpful? Give feedback.
All reactions