Created
December 30, 2015 12:28
-
-
Save wouterj/c208b2ba71f449b66978 to your computer and use it in GitHub Desktop.
This file contains 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 | |
class PostController extends Controller | |
{ | |
public function showAction($slug, $_template) | |
{ | |
$post = $this->someBackend->findBySlug($slug); | |
return $this->render($_template, ['post' => $post]); | |
} | |
} |
This file contains 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
some_route: | |
path: /blog/{slug} | |
defaults: | |
_controller: App:Post:show | |
_template: post/single.html.twig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment