Skip to content

Instantly share code, notes, and snippets.

@dragoonis
Created January 17, 2016 17:48
Show Gist options
  • Save dragoonis/64cc37d8da3dc6f69f6e to your computer and use it in GitHub Desktop.
Save dragoonis/64cc37d8da3dc6f69f6e to your computer and use it in GitHub Desktop.
<?php
use Application\Controller\Shared as SharedController;
use Psr\Http\Message\RequestInterface;
class Index extends SharedController
{
public function exampleAction(RequestInterface $request)
{
$message = $request->get('message');
echo $message;
exit;
return $this->render('Application:index:example.html.php');
}
}
?>
Example:
pattern: /example
defaults: { _controller: "Application:Index:example"}
requirements:
_method: POST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment