Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Sort by computed field #70
So, there are SOME things you can do, as you can see in that issue above. But one of the authors of Nova, David Hemphill, also said it's going to be tough to do it without breaking pagination--probably because it's using MySQL-based sort and you can't do that with a PHP-computed property.
With your periodically double-checking option, if you get stuck there and no one can solve this particular issue, one option (and maybe this is what you mean with periodical double-check it) is to set a trigger--either a cron job, or every time an event happens that would impact the computation of this field--that then makes Laravel calculate it and save it to the regular computed field. Like a projection.
Not sure where that lines up with your specific use case. Like I mentioned in the previous issue, I hope we can solve this because I've definitely run into it before!
Yep, that's what I mean. It would be nice to have the option to sort via Vue, for the models that's appropriate for. Then it would be doable! I don't have a good sense of how much data js can deal with, but I've done it by hand (not Nova) for projects with the amount of data in my use case, and it's a perfect solution.