Make url with api rest php

1

I have two tables: cars and garages.

I want to do the following:

url/coches/xxx/garaje

where xxx is the ID of the cars.

The problem is that I do not know what to put in the .htaccess and where to put the rest to appear.

I already made the page, that is:

coches?pagina=1 and I get the cars from page 1 (maximum 20 as I already put)

I'm doing for Api rest php

    
asked by Apiurl 15.03.2017 в 21:08
source

1 answer

0

I think the best option would be to have a url routing.

Look at this library: link

If you are using a franework, you should already have implemented routing functionalities since it is basic.

    
answered by 24.03.2017 в 00:53