From f1682c514d1accc8b1c9ffa99e467dc0e9b91061 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Fri, 16 Jun 2023 22:00:43 +0300 Subject: [PATCH 1/2] reorder routes to prevent conflict --- routes/web.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/routes/web.php b/routes/web.php index 7dd75f6..4e114c6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -9,21 +9,6 @@ use LaraZeus\Sky\Http\Livewire\Posts; use LaraZeus\Sky\Http\Livewire\Tags; -Route::prefix(config('zeus-sky.path')) - ->middleware(config('zeus-sky.middleware')) - ->group(function () { - Route::get('/', Posts::class)->name('blogs'); - Route::get(config('zeus-sky.post_uri_prefix') . '/{slug}', Post::class)->name('post'); - Route::get(config('zeus-sky.page_uri_prefix') . '/{slug}', Page::class)->name('page'); - Route::get('{type}/{slug}', Tags::class)->name('tags'); - - Route::get('passConf', function () { - session()->put(request('postID') . '-' . request('password'), request('password')); - - return redirect()->back()->with('status', 'sorry, password incorrect!'); - }); - }); - if (in_array('LaraZeus\Sky\Filament\Resources\FaqResource', config('zeus-sky.enabled_resources'))) { Route::middleware(config('zeus-sky.middleware')) ->get(config('zeus-sky.faq_uri_prefix'), Faq::class) @@ -38,3 +23,18 @@ Route::get('/{slug}', LibraryItem::class)->name('library.item'); }); } + +Route::prefix(config('zeus-sky.path')) + ->middleware(config('zeus-sky.middleware')) + ->group(function () { + Route::get('/', Posts::class)->name('blogs'); + Route::get(config('zeus-sky.post_uri_prefix') . '/{slug}', Post::class)->name('post'); + Route::get(config('zeus-sky.page_uri_prefix') . '/{slug}', Page::class)->name('page'); + Route::get('{type}/{slug}', Tags::class)->name('tags'); + + Route::get('passConf', function () { + session()->put(request('postID') . '-' . request('password'), request('password')); + + return redirect()->back()->with('status', 'sorry, password incorrect!'); + }); + }); \ No newline at end of file From 34e2fbf818d544697e712d0fad9810ef61e31e77 Mon Sep 17 00:00:00 2001 From: atmonshi Date: Fri, 16 Jun 2023 19:01:07 +0000 Subject: [PATCH 2/2] Fix styling --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 4e114c6..f0df1d6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -37,4 +37,4 @@ return redirect()->back()->with('status', 'sorry, password incorrect!'); }); - }); \ No newline at end of file + });