public function view($slug)
{
$productsOnCategoryPage = Configuration::getConfiguration('mage2_catalog_no_of_product_category_page');
$category = Category::where('slug', '=', $slug)->get()->first();
$products = $category->products()->paginate($productsOnCategoryPage);
return view('catalog.category.view')->with('category', $category)->with('products', $products);
}