what value should limit param takes to show all ?
Hello
This is how I limit the number of results :
$companies = $companies->paginate($value);
my question is : is there any value to give it to $value to show all (no pagination)
If you don't want pagination,
$companies = $companies->get();
Or calc the number of pages and use that number.
You can limit without pagination like this (assuming $companies is a query builder or model instance)
$companies = $companies->limit($value)->get();
@sti3bas
I created a traits :
(...)
}
}
}
$companies = $companies->paginate($this->limit);
return $companies;
and I want to use it in another places without changing this traits .
So i'm looking to put something in $this->limit
Using paginate is a slower way of doing it. Just use take() and insert a very large number when you want all
Please or to participate in this conversation.