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()
    {   
        $getData=Product::paginate(3);
        return view('products',compact('getData'));
    }
public function index ( ) { $ getData = Product :: paginate ( 3 ) ; return view ( 'products' , compact ( 'getData' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
// $getData=Product::all(); // $getData=Product::simplePaginate(3);