$product = Product::all()->take(50);
Query 50 pieces of data. How to sort by a certain field in descending order
$product = Product::where([])->orderBy('created_at','desc')->skip($pos)->take($limit)->get();
After reading your two recent questions, they were both because I didn’t read the document~~
$product = Product::where([])->orderBy('created_at','desc')->skip($pos)->take($limit)->get();
After reading your two recent questions, they were both because I didn’t read the document~~