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

Get param in Routing

José's Avatar

José

26 Jan, 2016 06:41 PM

Hello folks,

How can I get the param in this case?

$this->get('/{id}', function($request,$response,$args){
           return $response->withJson($this->get('singleSelect'));
 });

$this->appContainer['singleSelect'] = function ($id) {
          return $this->singleSelect($id);
 };

public function singleSelect($id) {
        return $id; >>>>>>>>> I need return this value.
 }

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