diff --git a/routes/web.php b/routes/web.php index 4bb4efd..76fe9fb 100644 --- a/routes/web.php +++ b/routes/web.php @@ -4,4 +4,20 @@ Route::get('/up', function () { return view('support::up'); -}); \ No newline at end of file +}); + +if (! app()->environment(['staging', 'production'])) { + Route::get('/docs', function () { + $files = scandir(base_path('docs')); + + foreach ($files as $file) { + if (! is_dir(base_path('docs/'.$file))) { + $sections[$file] = file_get_contents(base_path('docs/'.$file)); + } + } + + return view('support::docs', [ + 'sections' => $sections, + ]); + }); +} diff --git a/views/docs.blade.php b/views/docs.blade.php new file mode 100644 index 0000000..64b6898 --- /dev/null +++ b/views/docs.blade.php @@ -0,0 +1,38 @@ +@extends('layouts.main') + +@section('page-title', 'Application Docs') + +@section ('app-content') +