Skip to content

Commit

Permalink
Update wizard routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ycs77 committed Jun 20, 2019
1 parent 345f018 commit fe61c32
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Facades/Wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,23 @@ static public function routes(
'store' => 'store',
'done' => 'done',
'done_url' => 'done',
'use_done' => true,
], $options);

/** @var \Illuminate\Routing\Router $router */
$router = static::$app['router'];

$router->get(
"$uri/{$options['done_url']}",
"$controllerClass@{$options['done']}"
)->name("$name.{$options['done']}");
if ($options['use_done']) {
$router->get(
"$uri/{$options['done_url']}",
"$controllerClass@{$options['done']}"
)->name("$name.{$options['done']}");
}

$router->get(
"$uri/{step?}",
"$controllerClass@{$options['create']}"
)->name("$name.{$options['create']}");
)->name("$name");

$router->post(
"$uri/{step}",
Expand Down

0 comments on commit fe61c32

Please sign in to comment.