Skip to content

Commit

Permalink
install
Browse files Browse the repository at this point in the history
  • Loading branch information
totoprayogo1916 committed Dec 3, 2023
1 parent 6f3b8a7 commit beb4f3f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<hr>
<div style="width:400px;margin:0px auto;">
<h4>Klik “Lanjut” untuk memulai proses instalasi database SID. Proses instalasi memerlukan waktu singkat. Setelah selesai, Anda akan mendapatkan “username” dan “password”. Catat/simpan “username” dan “password” sebelum meneruskan ke langkah selanjutnya.</h4><br>
<a href="<?php echo site_url('main/install') ?>" class="uibutton special">Lanjut</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="<?php echo site_url(route_to('install.run')) ?>" class="uibutton special">Lanjut</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
</div>
</body>
Expand Down
18 changes: 9 additions & 9 deletions donjo-app/controllers/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,18 @@ public function index()
redirect('first');
}
} else {
redirect('main/initial');
redirect(route('install.view'));
}
}

/**
* View halaman install
*
* @return string
*/
public function initial()
{
view('install');
return view('install/index');
}

public function install()
Expand All @@ -61,15 +66,10 @@ public function install()
$out = $install->run();

if (null === $out) {
redirect('/');
redirect(route_to('index'));
}

view('init', $out);
}

public function init($out = null)
{
view('init', $out);
view('install/done', $out);
}

public function auth()
Expand Down
2 changes: 1 addition & 1 deletion donjo-app/helpers/donjolib_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function route_to(string $route_name, ...$args)
$urlParts = parse_url($route);

if ($urlParts !== false && isset($urlParts['path'])) {
return trim($urlParts['path'], '/');
return $urlParts['path'];
}

return $route;
Expand Down
1 change: 0 additions & 1 deletion donjo-app/routes/cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@

// Luthier\Cli::maker();
// Luthier\Cli::migrations();

7 changes: 6 additions & 1 deletion donjo-app/routes/web.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<?php

Route::get('/', 'main@index');
Route::get('/', 'main@index')->name('index');

Route::group('install', static function () {
Route::get('/', 'main@initial')->name('install.view');
Route::get('run', 'main@install')->name('install.run');
});

0 comments on commit beb4f3f

Please sign in to comment.