π Awards 2.x Update
Awards now fully supports Flarum 2.x! π
What changed?
The entire backend has been rewritten to follow Flarum 2.x standards:
- All API controllers and serializers replaced with the new
ApiResource pattern (5 Resource classes handling all CRUD)
Extend\ApiSerializer replaced with Extend\ApiResource(ForumResource) for permission attributes
- Added dedicated policies for Award, Category, Nominee, Vote, and OtherSuggestion
- Added
ScopeVisibilityTrait and ModelVisibility scoping on all models
- Added model searchers and search filters for 2.x Index endpoint support
- Complex business logic (vote limits, rate limiting, suggestion approve/reject/merge, slug generation) moved into Resource endpoint hooks
- Non-standard controllers converted to
RequestHandlerInterface
- JS dependencies updated to
flarum-webpack-config v3 and flarum-tsconfig v2
Nothing changed on the frontend β everything looks and works exactly the same. This was a pure backend modernization to ensure long-term compatibility with Flarum 2.x.
Demo
You can check out the 2.x version running live here:
π https://flarum2.huseyinfiliz.com/awards
How to update
If you're already running Awards on Flarum 1.x, make sure you upgrade your Flarum installation to 2.x first, then update the extension:
composer update huseyinfiliz/awards
php flarum migrate
php flarum cache:clear
Or use Run Global Update in Extension Manager as usual.
π Special Thanks
A huge shoutout to @stryguardian who sponsored the Flarum 2.x upgrade for three of my extensions β Awards being the second one. His continued support is what makes these updates possible. Thank you! π
If you have any questions or run into issues with the 2.x update, feel free to reply here or send me a message.