I am trying to achieve pagination after joining and grouping the query.
I have already tried other ideas but can't make pagination object appear, instead it will only show as a normal collection.
$this->join('products', 'products.id', '=', 'stocks.product_id')->get()->groupBy('title');
I tried $this->join('products', 'products.id', '=', 'stocks.product_id')->get()->groupBy('title')->paginate(15);
but it doesn't work. Where should i add paginate() function or do i need to do something other than that? Please let me know if i should explain more.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire