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