I am trying to make an API with Laravel with the Northwind database.
Now I want to be able to send parameters in my URL so I can get a specific product with the id that I put in the URL. For example (http://localhost/NorthwindAPI/public/api/product/3).
When I'm trying this, laravel is giving an error saying that the column products.id does not exist which is correct because my column name is called ProductID.
How do I change the query so that I can filter on the right column name?
This is the exact error it gave me:
Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'products.id' in 'where clause' (SQL: select * from
productswhereproducts.id= 3 limit 1) in file D:\wamp64\www\NorthwindAPI\vendor\laravel\framework\src\Illuminate\Database\Connection.php on line 664
I would really appreciate someones help.