I have a table called companies
which is related to another table called company_overviews
. The name of a company is stored in the company_overviews
table. How do I write a get request which returns the company which matches the name from company_overviews?
To get all companies I do:
http://localhost:4000/api/companies?withRelated=overviews
and I get back an array as such:
{
"id": 2,
"website": "aero.com",
"domain": "aero",
"overviews": [
{
"id": 2,
"company_id": 2,
"name": "aeroo",
}
]
}
{...}
I have tried
http://localhost:4000/api/companies?withRelated=overviews&overviews.name=searchValue
But i keep getting a 400 bad request