app/Http/Controllers/Api/ProductControllerApi.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()
    {
        $product = Products::all();
        $data=response()->json($product);
        dd($data);
    }
public function index ( ) { $ product = Products :: all ( ) ; $ data = response ( ) -> json ( $ product ) ; dd ( $ data ) ; }
Display a listing of the resource.
Display a listing of the resource .