mirror of
https://gitnet.fr/deblan/gist.git
synced 2021-08-14 08:30:49 +02:00
ed37fbf453
Service: refatoring Translations
16 lines
387 B
PHP
16 lines
387 B
PHP
<?php
|
|
|
|
use Symfony\Component\Routing\Loader\YamlFileLoader;
|
|
|
|
$app['routing.file'] = 'routing.yml';
|
|
|
|
$app['routing.loader'] = $app->share(function ($app) {
|
|
return new YamlFileLoader($app['config.locator']);
|
|
});
|
|
|
|
$app['routes'] = $app->extend('routes', function ($routes, $app) {
|
|
$routes->addCollection($app['routing.loader']->load($app['routing.file']));
|
|
|
|
return $routes;
|
|
});
|