public function productDetail($sex, $classify, $id) { $product = Product::find($id); $products = Product::where('deleted_at', '=', null)->where('id', '<>', $id)->where('sex', '=', $sex)->where('classify', '=', $classify)->paginate(9); $context = ['product' => $product, 'products' => $products]; return view('front.shop.Detail', $context); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $products = $this->_searchQuery(Product::where('deleted_at', '=', null))->paginate(20); $context = ['products' => $products]; return \View::make('admin.product.index', $context); }