TraceDash/routes/auth.php

26 lines
884 B
PHP
Raw Permalink Normal View History

2023-11-23 19:27:43 +01:00
<?php
use App\Http\Controllers\Auth\TwitchController;
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 () {
Route::get('/dashboard', [DashboardController::class, 'index'])
->name('dashboard');
Route::get('/channel/{channel}', [DashboardController::class, 'channel'])
->name('dashboard.channel');
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');
});