Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Commit

Permalink
Prepend slash in router method.
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Aug 2, 2014
1 parent 6edf2df commit c59e77d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/FluxBB/Server/Router.php
Expand Up @@ -78,7 +78,7 @@ public function getPath($handler, $parameters = [])
return $part;
}, $parts));

$path = ltrim($path, '/');
$path = '/' . ltrim($path, '/');
return $path;
}

Expand Down
2 changes: 1 addition & 1 deletion src/FluxBB/Server/ServiceProvider.php
Expand Up @@ -54,7 +54,7 @@ protected function registerViewHelpers()

$app->resolving('view', function ($view) use ($app) {
$view->share('route', function ($name, $parameters = []) use ($app) {
return '/' . $app['fluxbb.router']->getPath($name, $parameters);
return $app['fluxbb.router']->getPath($name, $parameters);
});

$view->share('method', function ($name) use ($app) {
Expand Down

0 comments on commit c59e77d

Please sign in to comment.