-
Notifications
You must be signed in to change notification settings - Fork 105
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
Combining paginate and joined table #153
Comments
This looks like an edge case I did not think about :(. Can you post SQLs for both cases? You can get the SQLs from https://github.com/barryvdh/laravel-debugbar. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello everybody
I have an invoice model which is related to another model (addresses) in which the address and name of the person the invoice is sent to are stated. I create an overview and want to sort by a couple of things, such as date, invoice number and name of the addressed person. The relation is defined trough a hasOne function.
I have tried two solutions in which different problems occur
option 1 invoicecontroller.php:
In this everyhting except the sorting by name. This does nothing.
Another option is this:
invoicecontroller.php
Invoice.php
In this I can sort by anything but it doesnt show the name. When I sort by name the names show up again. A workaround is to print the name differently, namely $invoice->address->name instead of $invoice->name, but than I can't sort by name anymore.
Does anybody know a workaround?
The text was updated successfully, but these errors were encountered: