Пример #1
0
 public function productList()
 {
     $productService = new ProductService();
     $is_search_done = 0;
     if (\Input::has('srchproduct_submit')) {
         $is_search_done = 1;
         $productService->setSearchFields(\Input::all());
     }
     $user = \Config::get('webshoppack::logged_user_id');
     $user_id = $user();
     $status_list = $productService->getProductStatusArr();
     $category_list = $productService->getCategoryDropOptions();
     $q = $productService->buildMyProductQuery();
     $perPage = \Config::get('webshoppack::paginate');
     $product_list = $q->paginate($perPage);
     return \View::make('webshoppack::productList', compact('product_list', 'productService', 'status_list', 'category_list', 'is_search_done'));
 }