web.php
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?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!
|
*/
// 多语言
$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']);
Route::get('blog.html', [\App\Http\Controllers\Index::class,'blog']);
//
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']);
});