Skip to content

Commit 86f90f1

Browse files
committed
Change frontend routes to GET to fix Livewire 404
Replaces Route::any with Route::get for custom and default frontend routes as a temporary fix for Livewire 404 not found errors. The original Route::any lines are commented out for reference.
1 parent 43021b7 commit 86f90f1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/InspireCms.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,17 @@ public function routes(): void
156156
: [];
157157

158158
foreach ($customFrontendRoutes as $index => $item) {
159-
Route::any($item['uri'], CmsControllers\FrontendController::class)
159+
// Temp fix Livewire 404 not found
160+
Route::get($item['uri'], CmsControllers\FrontendController::class)
161+
// Route::any($item['uri'], CmsControllers\FrontendController::class)
160162
->where($item['regex_constraints'] ?? [])
161163
->name($item['alias'] ?? 'content_' . $index);
162164
}
163165

164166
// default route
165-
Route::any($factory->getDefaultRoutePattern(), CmsControllers\FrontendController::class)
167+
// Temp fix Livewire 404 not found
168+
Route::get($factory->getDefaultRoutePattern(), CmsControllers\FrontendController::class)
169+
// Route::any($factory->getDefaultRoutePattern(), CmsControllers\FrontendController::class)
166170
->where($factory->getDefaultRouteConstraints())
167171
->name('default');
168172
});

0 commit comments

Comments
 (0)