Skip to content

Commit

Permalink
Merge pull request #104 from lara-zeus/fix-route
Browse files Browse the repository at this point in the history
reorder routes to prevent conflict
  • Loading branch information
atmonshi authored Jun 16, 2023
2 parents c25358e + 34e2fbf commit 01d5990
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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!');
});
});

0 comments on commit 01d5990

Please sign in to comment.