app/Http/Controllers/Category/CategoryProductController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Category $category)
    {
        $products = $category -> products;
        return $this -> showAll($products);
    }
public function index ( Category $ category ) { $ products = $ category -> products ; return $ this -> showAll ( $ products ) ; }
Display a listing of the resource.
Display a listing of the resource .