mirror of
https://github.com/flarum/framework.git
synced 2025-03-28 02:05:15 +08:00

It became apparent in https://github.com/flarum/core/issues/319#issuecomment-170558573 that there was no way for extensions to add filter parameters to the /api/posts endpoint (e.g. /api/posts?filter[mentioned]=1). Simply adding an event to modify the `$where` array severely limits how much can be done with the query. This commit refactors the controller so that filters are applied directly to the query Builder, and exposes the Builder in a new `ConfigurePostsQuery` event.
Description
Simple forum software for building great communities.
202 MiB
Languages
PHP
60.7%
TypeScript
26%
JavaScript
7.9%
Less
4.4%
Blade
0.8%
Other
0.2%