forked from metin2/web
WIP: started implementing shop, multi-language
This commit is contained in:
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user