app/Http/Controllers/ProductController.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()
    {
        $allProducts = Products::all();
        return view('products.product-index', [
            'allProducts' => $allProducts,
        ]);
    }
public function index ( ) { $ allProducts = Products :: all ( ) ; return view ( 'products.product-index' , [ 'allProducts' => $ allProducts , ] ) ; }
Display a listing of the resource.
Display a listing of the resource .