lundi 16 novembre 2020

get page number in object of laravel

i have object given below and i wanted to pagination in this how can i get

$productListArray = array();
 $productListObject = ((object)[
                "id"=>$productList->id, 
                "title"=>$productList->title,
                "slug"=>$productList->slug,
                'categoryName'=>$categoryName[0]->cat_title,
                'brand'=>$brandName[0]->brandname,
                'minMrp'=>$minMrp,
                'maxMrp' =>$maxMrp,
                'minSellingPrice' => $minSellingPrice,
                'maxSellingPrice' => $maxSellingPrice,
                'rating'=>$productList->rating,
                'rating_count' => $productList->rating_count,
                'image' => $img[0]
            ])->paginate();
       array_push($productListArray, $productListObject);
    }
    return response()->json($productListArray, 200);


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/35zLh7Q
via IFTTT

Aucun commentaire:

Enregistrer un commentaire