The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

How to use "?" char in my route to work with Loopback

jalr0005's Avatar

jalr0005

02 Mar, 2016 04:23 PM

I am creating an Loopback API to consume my Slim 3 API REST.

The problem is Slim use routes like "myapp.com/model/get/1" where 1 is de id, and Loopback consume routes like that "myapp.com/model?id=1".

First thing i thought is to add this in my Slim app, but did not work:

$app->get('/model/get/?id={id}

This is the Loopback connector:
https://docs.strongloop.com/display/public/LB/REST+connector

Wich uses URLs like that:
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway

Thanks in advance.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac