https://github.com/loremipsum/route-generator-bundle
Symfony bundle to create routes to resources.
https://github.com/loremipsum/route-generator-bundle
Last synced: 12 months ago
JSON representation
Symfony bundle to create routes to resources.
- Host: GitHub
- URL: https://github.com/loremipsum/route-generator-bundle
- Owner: loremipsum
- License: mit
- Created: 2018-12-27T09:00:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-23T12:02:41.000Z (about 7 years ago)
- Last Synced: 2025-07-08T14:32:54.311Z (12 months ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# RouteGenerator bundle
Symfony bundle to create routes to resources.
## Example route handler
```php
router = $router;
}
public function handle($value, $view = null, $context = [])
{
if ($value instanceof User) {
return $this->router->generate('userView', array_merge(['user' => $value->getId()], $context));
}
return null;
}
}
```
## Example usage
```
{% if is routable %}
{{ }}
{% else %}
{{ }}
{% endif %}
```