Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
services:
repository:
class: NSBundle\Repo\MyRepository
arguments: [ @service_container ]
<?php
namespace NSBundle\Repo;
use Symfony\Component\DependencyInjection\Container;
class MyRepository
{
public function __construct(Container $c)
{
$params = $c->get('request')->attributes->get('_route_params');
$id = $params['id'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.