Error in relations #1019
Replies: 4 comments
-
Couple of comments on this one in relation to your model.
In relation to your table, if you use the format function to display the value of the field instead, does it work correctly? |
Beta Was this translation helpful? Give feedback.
-
I solved this problem instead of |
Beta Was this translation helpful? Give feedback.
-
You definitely absolutely do it that way, but you may see an increased number of queries against your DB, which may impact scalability in the future. You'll want to eager load where you can to reduce db impact at scale. Run debugbar against it and see what it shows to make sure you're comfortable. If you intend to sort those fields, then I've made other posts on here discussing how to do that when using formatted output on this style If you want me to cast my eye over it properly then please make a basic repo with the necessary models and table and I'll look further over the coming week and let you know what best practice looks like. |
Beta Was this translation helpful? Give feedback.
-
In principle, I use the module "rennokki/laravel-eloquent-query-cache" and the number of queries to the database is not so critical |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I output relations and somehow the code works strangely
DataTable
`protected $model = Task::class;
Beta Was this translation helpful? Give feedback.
All reactions