Exemplo n.º 1
0
 public function indexAll()
 {
     logger()->info("Indexing all products");
     $products = Product::all();
     logger()->debug(sprintf("Found %d products.", count($products)));
     foreach ($products as $product) {
         $this->indexProduct($product->id);
     }
 }
Exemplo n.º 2
0
 /**
  * List all of the products.
  *
  * @return mixed
  */
 public function lists()
 {
     return View::make('product.list')->withProducts(Product::all());
 }
Exemplo n.º 3
0
 public function all()
 {
     return Product::all();
 }
Exemplo n.º 4
0
 public function allProductsApi()
 {
     $productList = Product::all();
     $categories = ProductSubCategory::all();
     foreach ($categories as $category) {
     }
     return response()->json(['response_message' => 'success', 'response_rows' => sizeof($productList), 'response_data' => $productList]);
 }
Exemplo n.º 5
0
 public function index()
 {
     $products = Product::all();
     return view('product.index', ['products' => $products]);
 }