Created
April 11, 2016 14:30
-
-
Save Raistlfiren/58db48c0ac741f338398d43b3b102f2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use NewsHandler; | |
$this->get('/{id:[0-9]+}/edit', function(ServerRequestInterface $request, ResponseInterface $response, $args) { | |
//Typehint newsHandler automatically instead of doing -> | |
/** @var NewsHandler $news*/ | |
// $news = $this->newsHandler; | |
$data = $this->newsHandler->getShow($args['id']); | |
return $this->view->render($response, 'news/show.html.twig', $data); | |
})->setName('new_edit'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment