Skip to content

Commit

Permalink
Offline page doesn't generate route
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Mar 25, 2016
1 parent 00993c3 commit 650db5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function map(Router $router)
if ($page = TypiCMS::getPageLinkedToModule('places')) {
$options = $page->private ? ['middleware' => 'auth'] : [];
foreach (config('translatable.locales') as $lang) {
if ($uri = $page->uri($lang)) {
if ($page->translate($lang)->status && $uri = $page->uri($lang)) {
$router->get($uri, $options + ['as' => $lang.'.places', 'uses' => 'PublicController@index']);
$router->get($uri.'/{slug}', $options + ['as' => $lang.'.places.slug', 'uses' => 'PublicController@show']);
}
Expand Down

0 comments on commit 650db5d

Please sign in to comment.