mirror of
https://github.com/aoaostar/toolbox.git
synced 2026-01-14 07:51:41 +00:00
26 lines
555 B
PHP
26 lines
555 B
PHP
<?php
|
|
|
|
use think\facade\Route;
|
|
|
|
Route::rule('api/:alias/[:method]', "Plugin/api")
|
|
->pattern([
|
|
'alias' => '[\w|\-]+',
|
|
])
|
|
->middleware(\app\middleware\PluginCheck::class);
|
|
|
|
|
|
Route::get(':alias/logo', 'Plugin/logo');
|
|
|
|
Route::group(':alias', function () {
|
|
|
|
Route::get('/static/*', 'static');
|
|
Route::get('/[:path]', 'index');
|
|
|
|
})->prefix('Plugin/')
|
|
->pattern([
|
|
'alias' => '[\w|\-]+',
|
|
'path' => '[\w\W]+',
|
|
])
|
|
->middleware(\app\middleware\PluginCheck::class)
|
|
->middleware(\app\middleware\View::class);
|