Paginate doesn't work with take

Posted 1 week ago by SkifAlef
$paginate = Model::take(100)->paginate(20);
$paginate->total() === 100 ---> false
$paginate->total() === Model::count() ---> true

$take = Model::take(100)->get();
sizeof($take) === 100 ---> true

Why? And is there any way to paginate limited dataset except of manual take and paginating?

Please sign in or create an account to participate in this conversation.