You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.6 KiB
PHTML

2 years ago
<?php
use App\Http\Controllers\ProfileController;
2 years ago
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\GamesController;
use App\Http\Controllers\IGDBController;
use App\Http\Controllers\AchievementController2;
2 years ago
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/
Route::get('/', function () {
2 years ago
#return view('welcome');
return view('main_menu');
2 years ago
});
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});
2 years ago
require __DIR__.'/auth.php';
2 years ago
Route::get('/games', [GamesController::class, 'index'])->name('games.index');
Route::get('/games/show/{slug}',[GamesController::class, 'show'])->name('games.show');
Route::get('/games/link', [GamesController::class, 'create'])->name('games.create');
Route::post('/games/link', [GamesController::class, 'store'])->name('games.store');
2 years ago
Route::get('/achievements', [AchievementController::class, 'showAchievements']);
Route::post('/achievements', [AchievementController::class, 'getAchievements']);