Pagination - Call to undefined method App\Company::links()
Morning All
Im trying to use Laravels pagination rather than datatables but am a bit stuck. I keep getting the above error and cant work out why... please could one of you kind folk advise.
You are overriding the $company variable on every iteration of the loop, so once you come out of the loop, it is a Model instance not a LengthAwarePaginator
Ah that makes a lot of sense. I did try it outside of the loop before original post but then got no links but it seems pluralising & moving it outside of the loop has solved it.
Thanks for your assistance & quick response. Much appreciated.