We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请教下tp8多应用模式下 think-swoole php think swoole 子应用下 路由无效怎么解决
app/ ├── api/ │ ├── route/ │ │ ├── api.php │ │ └── user.php │ └── ... ├── adminapi/ │ ├── route/ │ │ ├── api.php │ │ └── user.php │ └── ... └── route/ └── app.php
只有route下的路由有效api和adminapi下的route无效
The text was updated successfully, but these errors were encountered:
Event::listen(RouteLoaded::class, function () { $url = app()->request->url(); $url = str_starts_with($url, '/') ? substr($url, 1) : $url; $sub_app = substr($url, 0, strpos($url, '/')); app()->route->clear(); foreach (glob(root_path() . 'app/'.$sub_app . '/route/*.php') as $item) { include $item; } }); 试试这样
Sorry, something went wrong.
请问下是在什么文件加这段代码,谢谢
No branches or pull requests
请教下tp8多应用模式下 think-swoole php think swoole 子应用下 路由无效怎么解决
app/
├── api/
│ ├── route/
│ │ ├── api.php
│ │ └── user.php
│ └── ...
├── adminapi/
│ ├── route/
│ │ ├── api.php
│ │ └── user.php
│ └── ...
└── route/
└── app.php
只有route下的路由有效api和adminapi下的route无效
The text was updated successfully, but these errors were encountered: