作者:创办m觉e内能h行宫 | 来源:互联网 | 2023-10-09 20:39
Splitting up our front controllers is a great move, but URL generation is problematic in some cases:
- Flarum\Core\Handlers\Commands\RequestPasswordResetCommandHandler
- Flarum\Core\Handlers\Events\EmailConfirmationMailer
- Flarum\Api\Actions\Discussions\IndexAction
The first two are run through api.php, but need to generate forum routes.
The third can be run through index.php (when data is preloaded), but needs to generate an API route for the pagination links.
The Mentions extension also needs to generate forum routes when run via api.php.
how can we handle this?
该提问来源于开源项目:flarum/core
I'm planning to make all route collections available to the URL generator, but only parse those routes (for actual routing) that are needed in each section (API, forum, admin). Will do that early next week.