// replace get() $products = Product::where('active', 1)->get(); // by paginate() $products = Product::where('active', 1)->paginate(10);
// replace get() $products = Product::where('active', 1)->get(); // by paginate() $products = Product::where('active', 1)->paginate(10);