Releases: codinglabsau/laravel-roles
v2.5.1
- Support Laravel 11
Full Changelog: v2.5.0...v2.5.1
v2.5.0
Changed
- Dropped Laravel 9 compatibility due to complications managing PHPUnit 9 and 10
Full Changelog: v2.3.0...v2.5.0
Laravel 10 Support
Full Changelog: v2.3.0...v2.4.0
v2.3.0
Added Laravel 9 support.
v2.2.0
Added the @role('role-name')
blade directive.
v2.1.1
Added PHP 8 support.
v2.1.0
Added
- In the
CheckRole
middleware, a 401 exception will occur if the$request->user()
is not set. This prevents a call to->roles()
on a non-object. - Added HTTP tests to ensure check roles is working
Changed
- Refactored tests, added a new base test class, fixed namespace
v2.0.0
The following changes have been implemented for v2.0.0:
Optimised Role Check
Role check no longer queries the relationship every time it checks for a role. Instead the roles relationship is loaded and the collection is used to check for the existence of a role which only results in one query.
Migrations no longer automatically run
Initially in 1.x the migrations would run automatically using the packages migrations. This was restrictive as you couldn't publish them and customise the table columns. In v2 the migrations don't run automatically anymore and you must now publish the migrations to be able to use them. This gives greater control and flexibility over the roles and role_user table by allowing you to add new columns.
Configurable role model
There is now a config file that can be published in which you can reference your own role model to use for the roles relationships. This will have no impact on normal usage however the option is there if you need a custom Role model.
v1.2.0
Added Laravel 8 support
Gate can accept an array
- Fix gate to accept an array of roles
- add tests
- add travis-ci config