<?php

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!
|
*/
// TODO::这个是第一版 的路由,暂时不要删除,可能会临时想起了恢复看下
// 多语言
//$px = explode('/',trim($_SERVER['PATH_INFO']??'','/').'/')[0];
//if (empty(\App\Fun::lang()[$px])){
//    $px = '';
//}
//
//define('THE_LANG',$px ? : 'en');
//
//Route::prefix($px)->group(function (){
//    // 首页
//    Route::get('/', [\App\Http\Controllers\Index::class,'home']);
////    Route::get('/index.html', [\App\Http\Controllers\Index::class,'home']);
//
//// 关于我们
//    Route::get('about-us', [\App\Http\Controllers\Index::class,'about']);
////    Route::get('about-us.html', [\App\Http\Controllers\Index::class,'about']);
////    Route::get('about-us/index.html', [\App\Http\Controllers\Index::class,'about']);
//
////博客
//    Route::get('blog', [\App\Http\Controllers\Index::class,'blog'])->name('blog');
////    Route::get('blog.html', [\App\Http\Controllers\Index::class,'blog'])->name('blog');
//    Route::get('blog/{id}', [\App\Http\Controllers\Index::class,'blog_info'])->name('blog.info')->where('id','\d+');
////    Route::get('blog/{id}.html', [\App\Http\Controllers\Index::class,'blog_info'])->name('blog.info')->where('id','\d+');
//
////
//    Route::get('kol-solution', [\App\Http\Controllers\Index::class,'kolSolution']);
////    Route::get('kol-solution.html', [\App\Http\Controllers\Index::class,'kolSolution']);
//
////
//    Route::get('faq', [\App\Http\Controllers\Index::class,'fqa']);
////    Route::get('faq.html', [\App\Http\Controllers\Index::class,'fqa']);
//
//
//    Route::get('shop', [\App\Http\Controllers\Index::class,'shop']);
////    Route::get('shop.html', [\App\Http\Controllers\Index::class,'shop']);
//
//    Route::get('shopk-app', [\App\Http\Controllers\Index::class,'shopApp']);
////    Route::get('shopk-app.html', [\App\Http\Controllers\Index::class,'shopApp']);
//
//});
/***************************** end first ***********************************/


/**
 * 第二版暂时没有多语言功能
 */
Route::get('/', [\App\Http\Controllers\V2\Index::class,'home']);
// 博客列表
Route::get('/blogs', [\App\Http\Controllers\V2\Index::class,'blog']);
// 博客详情
Route::get('/blog/{id}', [\App\Http\Controllers\V2\Index::class,'blog_info'])->where('id','\d+');
// 单页
Route::get('/page/{id}', [\App\Http\Controllers\V2\Index::class,'page'])->where('id','\d+');