What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-28 06:21:04
random record get with pagination in karavel 8
Product::orderBy(DB::raw('RAND()'))->take(10)->get(); $products = Product::all()->random(); $products = Product::all()->random(10); $products = Product::all()->orderBy(DB::raw('RAND(1234)'))->paginate(4); Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5