Thanks for the reply Ramin.
I have tried your suggestion, but didnt work as expected. I need to fetch details from both the tables. So I am using a left join for this.That is why I have used distinct() function to prevent duplicate records. I am getting all the records as expected, but while using the Laravel "paginate()" function, the total count returned is wrong - the count returns the number of all records(Including duplicates).
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community