Docs Discussion Login Register

Discussion

Start Discussion General Feature Module Dev Theme Dev Installation Hosting

when i do composer update

when I click on a category an error is displayed (http://localhost:8000/category/electro)

BadMethodCallException thrown with message "Method Illuminate\Database\Query\Builder::getCategoryProductWithFilter does not exist."


Purvesh 1 year ago

Thanks for raising the Bug. I will fixed it and do another minor release soon.

Purvesh 1 year ago

I have fixed the Category Page Bug:

It you want you can simply replace the CategoryViewController.php code to like below:


/**
*
*
* @param Request $request
* @param $slug
* @return \Illuminate\Http\Response
*
*/
public function view(Request $request, $slug)
{
$productsOnCategoryPage = 9;

$category = $this->repository->findByKey($slug);
$catProducts = $this->repository->getCategoryProductWithFilter($category->id, $request->except(['page']));
$products = $this->repository->paginateProducts($catProducts, $productsOnCategoryPage);

return view('category.view')
->with('category', $category)
->with('params', $request->all())
->with('products', $products);
}

Reply
General Feature Module Dev Theme Dev Installation Hosting Save Cancel
© AvoRed 2019 Privacy