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-15 22:58:27 +08:00
|
|
|
use App\Http\Controllers\Console\Link as ConsoleLink;
|
|
|
|
use App\Http\Controllers\Function\Link as UserLink;
|
2023-06-13 20:27:21 +08:00
|
|
|
use App\Http\Controllers\Index;
|
2023-06-16 13:12:32 +08:00
|
|
|
use Illuminate\Http\Request;
|
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!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2023-06-13 12:14:00 +08:00
|
|
|
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 () {
|
2023-06-15 22:58:27 +08:00
|
|
|
Route::get('link',[UserLink::class,'ViewLink'])->name('function.link');
|
|
|
|
Route::get('make-friend',[UserLink::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-15 22:58:27 +08:00
|
|
|
Route::prefix('friends-link')->group(function () {
|
|
|
|
Route::redirect('list','list/1');
|
|
|
|
Route::get('list',[ConsoleLink::class,'ViewList'])->name('console.friends-link.list');
|
|
|
|
Route::get('check',[ConsoleLink::class,'ViewCheck'])->name('console.friends-link.check');
|
2023-06-16 13:12:32 +08:00
|
|
|
Route::get('edit/{userId}',function ($userId) {
|
|
|
|
$ConsoleLink = new ConsoleLink();
|
|
|
|
$request = new Request();
|
|
|
|
return $ConsoleLink->ViewEdit($request,$userId);
|
|
|
|
})->name('console.friends-link.edit');
|
2023-06-16 12:02:22 +08:00
|
|
|
Route::get('add',[ConsoleLink::class,'ViewAdd'])->name('console.friends-link.add');
|
2023-06-15 22:58:27 +08:00
|
|
|
});
|
2023-06-11 14:20:56 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::prefix('auth')->group(function () {
|
|
|
|
Route::redirect('','auth/login');
|
|
|
|
Route::get('login', function () {
|
2023-06-15 00:03:10 +08:00
|
|
|
$data = (new Index())->data;
|
|
|
|
return view('auth.login',$data);
|
2023-06-11 14:20:56 +08:00
|
|
|
})->name('login');
|
|
|
|
Route::get('register',function () {
|
2023-06-15 00:03:10 +08:00
|
|
|
$data = (new Index())->data;
|
|
|
|
return view('auth.register',$data);
|
2023-06-11 14:20:56 +08:00
|
|
|
})->name('register');
|
|
|
|
Route::get('forgotpassword',function () {
|
2023-06-15 00:03:10 +08:00
|
|
|
$data = (new Index())->data;
|
|
|
|
return view('auth.forgotpassword',$data);
|
2023-06-11 14:20:56 +08:00
|
|
|
})->name('forgotpassword');
|
|
|
|
Route::match(['get','post'],'logout',function () {
|
|
|
|
Auth::logout();
|
|
|
|
return Response::redirectTo('');
|
|
|
|
})->name('logout');
|
2023-06-10 14:21:40 +08:00
|
|
|
});
|