Level 50
Any reason why you want to use an array and not Laravel's built in pagination?
PS. You might want to take a look at this article and fix your n+1 query.
1 like
Hi. I have a problem with pagination. im getting rows with a loop;
$gelenBolum=array();
foreach ($tercih->gelen() as $gelenid) {
$gelenA=\App\KayitLisans::where(['boid' => $gelenid])->first();
if($gelenA!=null)
{
$gelenB=$gelenA['attributes'];
$gelenB['taban_puan'][3]=".";
$gelenB['tavan_puan'][3]=".";
$gelenA['attributes']=$gelenB;
$gelenBolum[]=$gelenA;
}
}
so i need paginate $gelenBolum array. i didnt use pagination before. so i have not even the slightest idea how to do this.
Please or to participate in this conversation.