public function getList()
 {
     $data['fields'] = $this->col;
     $data['num_fields'] = count($this->col);
     $get = Product::get();
     $data['result'] = $get;
     $data['qtyParticipant'] = $get->count();
     return View::make('admin.site.product', $data);
 }
Beispiel #2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($page = 5)
 {
     $menu = new Product();
     if ($page == 'all') {
         $page = Product::get()->count();
     }
     $products = Product::paginate($page);
     return view('admin.products.index', compact('products'));
 }
 /**
  * Display Generator Page
  *
  * @param Product $product
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(Product $product)
 {
     return response()->json($product->get(['id', 'code', 'name']));
 }