Feat: Updating routes and controllers to use the updated Services coming from boboko/core

This commit is contained in:
2026-08-29 00:17:34 +03:00
parent defe1dab12
commit c7cd1138fe
9 changed files with 48 additions and 22 deletions
+11 -1
View File
@@ -7,6 +7,16 @@
use App\Http\Controllers\ProductController;
use Illuminate\Support\Facades\Route;
// Bare `/` has no {locale} segment to prefix-match against, so it's declared outside
// the group below purely to give `locale` middleware a route to run on — the group's
// `Route::prefix('{locale}')` requires a non-empty first segment, so `/` would
// otherwise 404 before the middleware (which already redirects an empty/unrecognized
// locale segment to the resolved default) ever gets a chance to run. Middleware runs
// before controller parameter binding, so this never actually reaches
// HomeController::index()'s required $locale argument — the middleware always
// redirects a request with no matching locale segment first.
Route::get('/', [HomeController::class, 'index'])->middleware('locale');
Route::prefix('{locale}')
->middleware('locale')
->group(function () {
@@ -16,7 +26,7 @@
'product.show',
);
Route::get('/category/{collection}', [CategoryController::class, 'show'])->name(
Route::get('/category/{id}', [CategoryController::class, 'show'])->name(
'category.show',
);