1
0
forked from metin2/web

WIP: started implementing shop, multi-language

This commit is contained in:
2024-03-30 15:47:48 +02:00
parent 8a88940d4f
commit 181c7ce27c
244 changed files with 6167 additions and 827 deletions

View File

@ -3,6 +3,8 @@
use App\Http\Controllers\Auth\LoginController;
use App\Http\Controllers\Auth\RegisterController;
use App\Http\Controllers\Auth\VerificationController;
use App\Http\Controllers\Shop\CategoryController;
use App\Http\Controllers\Shop\ItemController;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Route;
@ -98,6 +100,20 @@ Route::prefix('legal')->group(function() {
Route::get('/imprint', fn () => view('legal/imprint'));
});
Route::prefix('shop')->middleware(['auth', 'verified'])->group(function() {
Route::get('/', fn () => view('shop/home'));
Route::get('userdata', fn () => view('shop/userdata', ['storageCount' => 10, 'boughtCount' => 0]));
Route::get('category/{id}', [CategoryController::class, 'show'])->name('shop.category');
Route::get('items/{id}', [ItemController::class, 'show'])->name('shop.item');
Route::get('items/{id}/buy', [ItemController::class, 'show'])->name('shop.item.buy');
Route::fallback(function() {
return response()->view('errors/shop-notfound', [], 404);
});
});
Route::fallback(function() {
return response()->view('errors.404', [], 404);
});