XF_Index/routes/web.php

60 lines
2.0 KiB
PHP
Raw Normal View History

2023-06-10 14:21:40 +08:00
<?php
/*
* Copyright © 2016 - 2023 筱锋xiao_lfeng. All Rights Reserved.
* 开发开源遵循 MIT 许可,若需商用请联系开发者
* https://www.x-lf.com/
*/
2023-06-12 16:12:20 +08:00
use App\Http\Controllers\Console\Dashboard;
2023-06-13 20:27:21 +08:00
use App\Http\Controllers\Function\Link;
use App\Http\Controllers\Index;
2023-06-11 14:20:56 +08:00
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Response;
2023-06-10 14:21:40 +08:00
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', [Index::class,'ViewIndex'])->name('home');
2023-06-13 20:27:21 +08:00
Route::get('about',[Index::class,'ViewAboutMe'])->name('about');
Route::prefix('function')->group(function () {
Route::get('link',[Link::class,'ViewLink'])->name('function.link');
2023-06-15 00:02:54 +08:00
Route::get('make-friend',[Link::class,'ViewMakeFriend'])->name('function.make-friend');
2023-06-13 20:27:21 +08:00
Route::get('sponsor',function () {
return view('function.sponsor');
})->name('function.sponsor');
Route::get('music',function () {
return view('function.music');
})->name('function.music');
});
2023-06-11 14:20:56 +08:00
Route::prefix('console')->middleware('auth')->group(function () {
2023-06-12 16:12:20 +08:00
Route::get('dashboard', [Dashboard::class,'ViewDashboard'])->name('console.dashboard');
2023-06-11 14:20:56 +08:00
});
Route::prefix('auth')->group(function () {
Route::redirect('','auth/login');
Route::get('login', function () {
return view('auth.login');
})->name('login');
Route::get('register',function () {
return view('auth.register');
})->name('register');
Route::get('forgotpassword',function () {
return view('auth.forgotpassword');
})->name('forgotpassword');
Route::match(['get','post'],'logout',function () {
Auth::logout();
return Response::redirectTo('');
})->name('logout');
2023-06-10 14:21:40 +08:00
});