2023-11-23 19:27:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use App\Http\Controllers\Auth\TwitchController;
|
2023-11-24 00:16:43 +01:00
|
|
|
use App\Http\Controllers\DashboardController;
|
2023-12-19 21:38:50 +01:00
|
|
|
use App\Http\Controllers\ViewerController;
|
2023-11-23 19:27:43 +01:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
Route::middleware('guest')->group(function () {
|
|
|
|
Route::get('auth/twitch', [TwitchController::class, 'redirect'])->name('login');
|
|
|
|
Route::get('auth/twitch/callback', [TwitchController::class, 'callback']);
|
|
|
|
});
|
|
|
|
|
|
|
|
Route::middleware('auth')->group(function () {
|
2023-11-24 00:16:43 +01:00
|
|
|
Route::get('/dashboard', [DashboardController::class, 'index'])
|
|
|
|
->name('dashboard');
|
|
|
|
|
|
|
|
Route::get('/channel/{channel}', [DashboardController::class, 'channel'])
|
|
|
|
->name('dashboard.channel');
|
|
|
|
|
2023-12-21 15:14:55 +01:00
|
|
|
Route::get('/viewer/{viewer}', [ViewerController::class, 'index'])
|
2023-12-19 21:38:50 +01:00
|
|
|
->name('viewer');
|
|
|
|
|
2023-11-23 19:27:43 +01:00
|
|
|
Route::post('logout', [TwitchController::class, 'logout'])
|
|
|
|
->name('logout');
|
|
|
|
});
|