homepage, new newsletter section, multilang support

This commit is contained in:
elvira
2026-08-08 14:50:10 +03:00
parent bf8b9219fc
commit e46276a31b
26 changed files with 1580 additions and 547 deletions
+17 -6
View File
@@ -1,12 +1,23 @@
<?php
use App\Http\Controllers\HomeController;
use App\Http\Controllers\ProductController;
use Illuminate\Support\Facades\Route;
Route::get("/", function () {
return view("welcome");
});
// Bare root carries no language signal, so it just redirects to the default locale.
Route::redirect('/', '/'.config('app.locale'));
Route::get("/products/{product}", [ProductController::class, "show"])->name(
"product.show",
);
Route::prefix('{locale}')
->where(['locale' => implode('|', config('app.available_locales'))])
->middleware('setlocale')
->group(function () {
Route::get('/', [HomeController::class, 'index'])->name('home');
Route::get('/products/{product}', [ProductController::class, 'show'])->name(
'product.show',
);
Route::get('/__preview/newsletter-split', function () {
return view('__preview_newsletter_split');
});
});