spatie/laravel-permission
Permission handling for Laravel 12 and up
8.3.0
112M downloads/mo
#227 most downloaded on composer
spatie/laravel-permission
What this package is like to depend on
Last release 1 months ago
03 Jul 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 208 of 224 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
224 releases · first in 2015
20 releases in the last 12 months
see the full history below
Release timeline
223 releases · Sep 2015 to Jul 2026Releases
latest 60 of 224-
8.3.003 Jul 2026Release notes
Open source →What's Changed
- Fix
initializeCache()not clearing in-memory perms collection on tenant/cache switch by @drbyte in #2965 - Add wiring-level test coverage for the Octane reset listener by @drbyte in #2966
ALSO CHECK THE RELEASE NOTES FOR 8.2.0
Full Changelog: 8.2.0...8.3.0
Release notes
Open source →What's Changed
- Fix
initializeCache()not clearing in-memory perms collection on tenant/cache switch by @drbyte in https://github.com/spatie/laravel-permission/pull/2965 - Add wiring-level test coverage for the Octane reset listener by @drbyte in https://github.com/spatie/laravel-permission/pull/2966
ALSO CHECK THE RELEASE NOTES FOR 8.2.0
Full Changelog: https://github.com/spatie/laravel-permission/compare/8.2.0...8.3.0
- Fix
-
8.2.002 Jul 2026Release notes
Open source →What's Changed
- Fire PermissionDetachedEvent when syncing permissions (symmetry with syncRoles) by @chengkangzai in #2963
- Fixed a bug where removing a role or permission from a model on one team could also remove that same assignment on other teams, when the model uses a custom pivot class (
->using(CustomPivot::class)) onroles()/permissions()with teams enabled. (Issue #2867) by @drbyte in #2961
Watch out for in your own test suite:
- If you use custom pivot model
deleting/deletedhooks to react to role/permission removal under teams, those hooks were already unreliable in this scenario and remain out of scope — switch to listening forRoleDetachedEvent/PermissionDetachedEventinstead. revokePermissionTo()can now throwGuardDoesNotMatchin rare cases where it previously wouldn't have, as a side effect of routing through the same guard-check used bygivePermissionTo(). This should not affect normal usage (permissions being revoked are already guard-matched), but if your tests exercise unusual multi-guard setups, re-run them against this release.
Full Changelog: 8.1.0...8.2.0
Release notes
Open source →What's Changed
- Fire PermissionDetachedEvent when syncing permissions (symmetry with syncRoles) by @chengkangzai in https://github.com/spatie/laravel-permission/pull/2963
- Fixed a bug where removing a role or permission from a model on one team could also remove that same assignment on other teams, when the model uses a custom pivot class (
->using(CustomPivot::class)) onroles()/permissions()with teams enabled. (Issue #2867) by @drbyte in https://github.com/spatie/laravel-permission/pull/2961
Watch out for in your own test suite:
- If you use custom pivot model
deleting/deletedhooks to react to role/permission removal under teams, those hooks were already unreliable in this scenario and remain out of scope — switch to listening forRoleDetachedEvent/PermissionDetachedEventinstead. revokePermissionTo()can now throwGuardDoesNotMatchin rare cases where it previously wouldn't have, as a side effect of routing through the same guard-check used bygivePermissionTo(). This should not affect normal usage (permissions being revoked are already guard-matched), but if your tests exercise unusual multi-guard setups, re-run them against this release.
Full Changelog: https://github.com/spatie/laravel-permission/compare/8.1.0...8.2.0
-
8.1.027 Jun 2026Release notes
Open source →What's Changed
- Fixed: mismatched surrounding quote characters in pipe-delimited role strings are now preserved instead of stripped. by @albertoarena in #2960
Fixes malformed pipe strings that start with
'or"and do not end with the same quote. Normal documented usage is unchanged:hasAnyRole('writer|admin') // same hasAnyRole("'writer|admin'") // same hasAnyRole('"writer|admin"') // same hasAnyRole("'writer|admin") // changed: mismatched apostrophe is removed hasAnyRole("'writer|admin\"") // changed: mismatched quote is removed
also
- docs: modernize middleware usage examples by @zainphp in #2954
- Bump actions/checkout from 6 to 7 by @dependabot[bot] in #2959
New Contributors
- @zainphp made their first contribution in #2954
- @albertoarena made their first contribution in #2960
Full Changelog: 8.0.0...8.1.0
-
8.0.030 May 2026Release notes
Open source →What's Changed
- Extend BackedEnum support on Role/Permission by @YasserB94 in #2953
Full Changelog: 7.4.2...8.0.0
-
7.4.230 May 2026Release notes
Open source →What's Changed
- Remove stale phpstan ignore HasPermission instanceof.alwaysFalse by @YasserB94 in #2952
Full Changelog: 7.4.1...7.4.2
Release notes
Open source →What's Changed
- Remove stale phpstan ignore HasPermission instanceof.alwaysFalse by @YasserB94 in https://github.com/spatie/laravel-permission/pull/2952
Full Changelog: https://github.com/spatie/laravel-permission/compare/7.4.1...7.4.2
-
7.4.129 Apr 2026Release notes
Open source →What's Changed
- Do not throw from teams() when teams feature is disabled by @freekmurze in #2949
Full Changelog: 7.4.0...7.4.1
Release notes
Open source →What's Changed
- Do not throw from teams() when teams feature is disabled by @freekmurze in https://github.com/spatie/laravel-permission/pull/2949
Full Changelog: https://github.com/spatie/laravel-permission/compare/7.4.0...7.4.1
-
7.4.028 Apr 2026Release notes
Open source →What's Changed
- Bump dependabot/fetch-metadata from 2 to 3 by @dependabot[bot] in #2945
- Fix malformed Bouncer link in README by @dhrupo in #2943
- Teams accessors in HasRolesTrait by @AnjeyNov in #2928
- Add syncModels method to Role model with HasModels trait by @Briareos17 in #2922
New Contributors
- @dhrupo made their first contribution in #2943
- @AnjeyNov made their first contribution in #2928
- @Briareos17 made their first contribution in #2922
Full Changelog: 7.3.0...7.4.0
Release notes
Open source →What's Changed
- Bump dependabot/fetch-metadata from 2 to 3 by @dependabot[bot] in https://github.com/spatie/laravel-permission/pull/2945
- Fix malformed Bouncer link in README by @dhrupo in https://github.com/spatie/laravel-permission/pull/2943
- Teams accessors in HasRolesTrait by @AnjeyNov in https://github.com/spatie/laravel-permission/pull/2928
- Add syncModels method to Role model with HasModels trait by @Briareos17 in https://github.com/spatie/laravel-permission/pull/2922
New Contributors
- @dhrupo made their first contribution in https://github.com/spatie/laravel-permission/pull/2943
- @AnjeyNov made their first contribution in https://github.com/spatie/laravel-permission/pull/2928
- @Briareos17 made their first contribution in https://github.com/spatie/laravel-permission/pull/2922
Full Changelog: https://github.com/spatie/laravel-permission/compare/7.3.0...7.4.0
-
7.3.007 Apr 2026Release notes
Open source →What's Changed
Downgraded PHP requirement to 8.3.
- Change PHP requirement from ^8.4 to ^8.3 by @erikn69 in #2939
- [Docs] Fix grammar: 'offers' -> 'offer' by @tareq-halaby in #2940
New Contributors
- @tareq-halaby made their first contribution in #2940
Full Changelog: 7.2.4...7.3.0
Release notes
Open source →What's Changed
Downgraded PHP requirement to 8.3.
- Change PHP requirement from ^8.4 to ^8.3 by @erikn69 in https://github.com/spatie/laravel-permission/pull/2939
- [Docs] Fix grammar: 'offers' -> 'offer' by @tareq-halaby in https://github.com/spatie/laravel-permission/pull/2940
New Contributors
- @tareq-halaby made their first contribution in https://github.com/spatie/laravel-permission/pull/2940
Full Changelog: https://github.com/spatie/laravel-permission/compare/7.2.4...7.3.0
-
7.2.417 Mar 2026Release notes
Open source →What's Changed
- Internals only.
- Bump ramsey/composer-install from 3 to 4 by @dependabot[bot] in #2936
Full Changelog: 7.2.3...7.2.4
Release notes
Open source →What's Changed
- Internals only.
- Bump ramsey/composer-install from 3 to 4 by @dependabot[bot] in https://github.com/spatie/laravel-permission/pull/2936
Full Changelog: https://github.com/spatie/laravel-permission/compare/7.2.3...7.2.4
-
7.2.323 Feb 2026 -
7.2.222 Feb 2026Release notes
Open source →What's Changed
- Clear wildcard permission index when assigning or removing roles by @freekmurze in https://github.com/spatie/laravel-permission/pull/2925
Full Changelog: https://github.com/spatie/laravel-permission/compare/7.2.1...7.2.2
-
7.2.121 Feb 2026Release notes
Open source →What's Changed
- Add Laravel 13 support
- Upgrade to laravel/passport ^13.0
- Drop prefer-lowest from CI matrix
-
7.2.016 Feb 2026Release notes
Open source →What's Changed
- Fix: do not treat string '0' as empty role/permission input by @laraib15 in https://github.com/spatie/laravel-permission/pull/2916
New Contributors
- @laraib15 made their first contribution in https://github.com/spatie/laravel-permission/pull/2916
Full Changelog: https://github.com/spatie/laravel-permission/compare/7.1.0...7.2.0
-
7.1.014 Feb 2026Release notes
Open source →What's Changed
- [v7] Bring back support for PHP 8.3 by @ssw1cblarrion in https://github.com/spatie/laravel-permission/pull/2918
New Contributors
- @ssw1cblarrion made their first contribution in https://github.com/spatie/laravel-permission/pull/2918
Full Changelog: https://github.com/spatie/laravel-permission/compare/7.0.0...7.1.0
-
7.0.011 Feb 2026Release notes
Open source →Modernize codebase for v7
The aim for v7 is to modernize the codebase while keeping the upgrade path easy. Modern PHP/Laravel features, Pest tests, but no big architectural changes. A future v8 could then tackle larger changes and streamline the package more fundamentally.
Version requirements
- Requires PHP ^8.4 and Laravel ^12.0
- Test suite uses Pest ^3.0
Service provider
- Converted to
PackageServiceProviderfromspatie/laravel-package-tools - Removed Lumen support
Class renames
- Event classes now have an
Eventsuffix (PermissionAttached→PermissionAttachedEvent, etc.) - Command classes now have a
Commandsuffix (CacheReset→CacheResetCommand, etc.)
Type safety
- Added return types and parameter types throughout traits, middleware, exceptions, contracts, and commands
Code modernization
is_a($this, X::class)→$this instanceof Xget_class($obj)→$obj::classstrpos($x, $y) !== false→str_contains($x, $y)- Constructor promotion in
WildcardPermission - Proper
useimports for global classes
Cleanup
- Removed deprecated
clearClassPermissions()method - Removed
__constructfromWildcardcontract - Modernized migration stubs
Testing
- Converted entire test suite from PHPUnit to Pest (#2912)
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.24.1...7.0.0
-
6.25.017 Mar 2026Release notes
Open source →What's Changed
- Add Laravel 13 compatibility to old branch, so that 3rd party packages can support L13 without urgent upgrading
- Convert test suite from PHPUnit to Pest by @freekmurze in #2912
Full Changelog: 6.24.1...6.25.0
Release notes
Open source →What's Changed
- Add Laravel 13 compatibility to old branch, so that 3rd party packages can support L13 without urgent upgrading
- Convert test suite from PHPUnit to Pest by @freekmurze in https://github.com/spatie/laravel-permission/pull/2912
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.24.1...6.25.0
-
6.24.109 Feb 2026Release notes
Open source →What's Changed
- Add team support to permission:assign-role command by @freekmurze in https://github.com/spatie/laravel-permission/pull/2910
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.24.0...6.24.1
-
6.24.013 Dec 2025Release notes
Open source →What's Changed
- Add BackedEnum Support to RoleOrPermissionMiddleware by @imhayatunnabi in https://github.com/spatie/laravel-permission/pull/2890
- Add Missing roleOrPermission() route macro by @imhayatunnabi in https://github.com/spatie/laravel-permission/pull/2893
- PHP 8.5: Fix deprecated usage of
nullas array key by @jnoordsij in https://github.com/spatie/laravel-permission/pull/2904
Internals/Testing
- Skip prefer-lowest dependency version for Laravel 11 by @drbyte in https://github.com/spatie/laravel-permission/pull/2903
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in https://github.com/spatie/laravel-permission/pull/2901
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.23.0...6.24.0
-
6.23.003 Nov 2025Release notes
Open source →What's Changed
- Performance enhancement: Reduce unnecessary container resolution calls by @imhayatunnabi in https://github.com/spatie/laravel-permission/pull/2889
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.22.0...6.23.0
-
6.22.027 Oct 2025Release notes
Open source →What's Changed
- Dispatch RoleDetached on syncRoles when events are enabled by @josedaian in https://github.com/spatie/laravel-permission/pull/2869
- Refactor exception handling in migration stub by @alisalehi1380 in https://github.com/spatie/laravel-permission/pull/2886
- Fix TOCTOU race condition in permission loading for concurrent (Octane etc) environments by @imhayatunnabi in https://github.com/spatie/laravel-permission/pull/2883
- Add assign-role command by @sediqzada94 in https://github.com/spatie/laravel-permission/pull/2834
- Test PHP 8.5 by @erikn69 in https://github.com/spatie/laravel-permission/pull/2880
- Bump stefanzweifel/git-auto-commit-action from 6 to 7 by @dependabot[bot] in https://github.com/spatie/laravel-permission/pull/2882
- Update issue template by @AlexVanderbist in https://github.com/spatie/laravel-permission/pull/2875
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/spatie/laravel-permission/pull/2870
- Quick Panel (TALL Flowbite Starter Kit) by @aliqasemzadeh in https://github.com/spatie/laravel-permission/pull/2881
New Contributors
- @josedaian made their first contribution in https://github.com/spatie/laravel-permission/pull/2869
- @alisalehi1380 made their first contribution in https://github.com/spatie/laravel-permission/pull/2886
- @imhayatunnabi made their first contribution in https://github.com/spatie/laravel-permission/pull/2883
- @sediqzada94 made their first contribution in https://github.com/spatie/laravel-permission/pull/2834
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.21.0...6.22.0
-
6.21.023 Jul 2025Release notes
Open source →What's Changed
- Allow removing multiple roles with the
removeRolemethod by @TobMoeller in https://github.com/spatie/laravel-permission/pull/2859 - [Docs] Correct middleware order for documentation example in
teams-permissions.mdby @dualklip in https://github.com/spatie/laravel-permission/pull/2863
New Contributors
- @dualklip made their first contribution in https://github.com/spatie/laravel-permission/pull/2863
- @TobMoeller made their first contribution in https://github.com/spatie/laravel-permission/pull/2859
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.20.0...6.21.0
- Allow removing multiple roles with the
-
6.20.005 Jun 2025Release notes
Open source →What's Changed
- Add translations support for exception messages by @nAa6666 in https://github.com/spatie/laravel-permission/pull/2852
New Contributors
- @nAa6666 made their first contribution in https://github.com/spatie/laravel-permission/pull/2852
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.19.0...6.20.0
-
6.19.031 May 2025Release notes
Open source →What's Changed
- Revert "Remove
collectPermissionsthat is not being assigned" by @erikn69 in https://github.com/spatie/laravel-permission/pull/2851 - Fix guard_name not used to set default attribute in Role and Permission model by @Ken-vdE in https://github.com/spatie/laravel-permission/pull/2837
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.18.0...6.19.0
- Revert "Remove
-
6.18.014 May 2025Release notes
Open source →What's Changed
- refactor exception throwing in migration file to use throw_if() by @ccaioadriano in https://github.com/spatie/laravel-permission/pull/2819
- Fix: Example in config comment includes
permission.prefix onwildcard_permissionkey by @jerrens in https://github.com/spatie/laravel-permission/pull/2835 - Fix commented config key typo by @erikn69 in https://github.com/spatie/laravel-permission/pull/2844
- Remove
collectPermissionsthat is not being assigned by @JHWelch in https://github.com/spatie/laravel-permission/pull/2840 - [Docs] Update multiple-guards.md by @Ken-vdE in https://github.com/spatie/laravel-permission/pull/2836
- [Docs] Remove extra period by @coreyhn in https://github.com/spatie/laravel-permission/pull/2841
- Add JetAdmin as UI Option. by @aliqasemzadeh in https://github.com/spatie/laravel-permission/pull/2814
New Contributors
- @ccaioadriano made their first contribution in https://github.com/spatie/laravel-permission/pull/2819
- @coreyhn made their first contribution in https://github.com/spatie/laravel-permission/pull/2841
- @jerrens made their first contribution in https://github.com/spatie/laravel-permission/pull/2835
- @Ken-vdE made their first contribution in https://github.com/spatie/laravel-permission/pull/2836
- @JHWelch made their first contribution in https://github.com/spatie/laravel-permission/pull/2840
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.17.0...6.18.0
-
6.17.008 Apr 2025Release notes
Open source →What's Changed
- Route macro functions: add backed enum support by @Yi-pixel in https://github.com/spatie/laravel-permission/pull/2823
New Contributors
- @Yi-pixel made their first contribution in https://github.com/spatie/laravel-permission/pull/2823
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.16.0...6.17.0
-
6.16.028 Feb 2025Release notes
Open source →What's Changed
- Middleware: support enums in role/permission middleware by @marklawntalk in https://github.com/spatie/laravel-permission/pull/2813
New Contributors
- @marklawntalk made their first contribution in https://github.com/spatie/laravel-permission/pull/2813
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.15.0...6.16.0
-
6.15.017 Feb 2025Release notes
Open source →What's Changed
- Added 4 events for adding and removing roles or permissions by @sven-wegner in https://github.com/spatie/laravel-permission/pull/2742
- Fixed bug of loading user roles of different teams to current team by @mohamedds-12 in https://github.com/spatie/laravel-permission/pull/2803
New Contributors
- @sven-wegner made their first contribution in https://github.com/spatie/laravel-permission/pull/2742
- @mohamedds-12 made their first contribution in https://github.com/spatie/laravel-permission/pull/2803
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.14.0...6.15.0
-
6.14.013 Feb 2025Release notes
Open source →What's Changed
- LDAP model lookup from Auth Provider by @crossplatformconsulting in https://github.com/spatie/laravel-permission/pull/2750
Internals
- Add PHPUnit annotations, for future compatibility with PHPUnit 12 by @drbyte in https://github.com/spatie/laravel-permission/pull/2806
New Contributors
- @crossplatformconsulting made their first contribution in https://github.com/spatie/laravel-permission/pull/2750
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.13.0...6.14.0
-
6.13.005 Feb 2025Release notes
Open source →What's Changed
- LazyLoading: Explicitly call
loadMissing('permissions')when the relation is needed, and test withModel::preventLazyLoading()by @erikn69 in https://github.com/spatie/laravel-permission/pull/2776 - [Docs] Add instructions to reinitialize cache for multi-tenancy key settings when updating multiple tenants in a single request cycle, by @sudkumar in https://github.com/spatie/laravel-permission/pull/2804
New Contributors
- @sudkumar made their first contribution in https://github.com/spatie/laravel-permission/pull/2804
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.12.0...6.13.0
- LazyLoading: Explicitly call
-
6.12.031 Jan 2025Release notes
Open source →What's Changed
- Support Laravel 12
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.11.0...6.12.0
-
6.11.030 Jan 2025Release notes
Open source →What's Changed
- Add configurable team resolver for permission team id (helpful for Jetstream, etc) by @adrenallen in https://github.com/spatie/laravel-permission/pull/2790
Internals
- Replace php-cs-fixer with Laravel Pint by @bobbrodie in https://github.com/spatie/laravel-permission/pull/2780
Documentation Updates
- [Docs] Include namespace in example in uuid.md by @ken-tam in https://github.com/spatie/laravel-permission/pull/2764
- [Docs] Include Laravel 11 example in exceptions.md by @frankliniwobi in https://github.com/spatie/laravel-permission/pull/2768
- [Docs] Fix typo in code example in passport.md by @m3skalina in https://github.com/spatie/laravel-permission/pull/2782
- [Docs] Correct username in new-app.md by @trippodi in https://github.com/spatie/laravel-permission/pull/2785
- [Docs] Add composer specificity by @imanghafoori1 in https://github.com/spatie/laravel-permission/pull/2772
- [Docs] Update installation-laravel.md to fix providers.php location. by @curiousteam in https://github.com/spatie/laravel-permission/pull/2796
New Contributors
- @ken-tam made their first contribution in https://github.com/spatie/laravel-permission/pull/2764
- @frankliniwobi made their first contribution in https://github.com/spatie/laravel-permission/pull/2768
- @bobbrodie made their first contribution in https://github.com/spatie/laravel-permission/pull/2780
- @m3skalina made their first contribution in https://github.com/spatie/laravel-permission/pull/2782
- @trippodi made their first contribution in https://github.com/spatie/laravel-permission/pull/2785
- @imanghafoori1 made their first contribution in https://github.com/spatie/laravel-permission/pull/2772
- @curiousteam made their first contribution in https://github.com/spatie/laravel-permission/pull/2796
- @adrenallen made their first contribution in https://github.com/spatie/laravel-permission/pull/2790
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.10.1...6.11.0
-
6.10.108 Nov 2024Release notes
Open source →What's Changed
- Fix #2749 regression bug in
6.10.0: "Can no longer delete permissions" by @erikn69 in https://github.com/spatie/laravel-permission/pull/2759
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.10.0...6.10.1
- Fix #2749 regression bug in
-
6.10.005 Nov 2024Release notes
Open source →What's Changed
- Fix
GuardDoesNotMatch should accept collectionby @erikn69 in https://github.com/spatie/laravel-permission/pull/2748 - Improve performance for hydrated collections by @inserve-paul in https://github.com/spatie/laravel-permission/pull/2749
- Only show error if
cache key existsandforgetCachedPermissionsfails by @erikn69 in https://github.com/spatie/laravel-permission/pull/2707 - Remove v5 cache fallback alias by @drbyte in https://github.com/spatie/laravel-permission/pull/2754
- Include
Larastanindevby @drbyte in https://github.com/spatie/laravel-permission/pull/2755
Docs
- [Docs example] Check for 'all' or 'any' permissions before specific permissions by @ceilidhboy in https://github.com/spatie/laravel-permission/pull/2694
- [Docs] Fix typo in uuid.md by @levizoesch in https://github.com/spatie/laravel-permission/pull/2705
- [Docs] Upgrade Guide - Add PR links to upgrade guide by @mraheelkhan in https://github.com/spatie/laravel-permission/pull/2716
- [Docs] use more modern syntax for nullable return type by @galangaidilakbar in https://github.com/spatie/laravel-permission/pull/2719
- [Docs] camelCase variable naming in example by @KamilWojtalak in https://github.com/spatie/laravel-permission/pull/2723
- [Docs] Update using-policies.md by @marcleonhard in https://github.com/spatie/laravel-permission/pull/2741
- [Docs] Example of pushing custom middleware before SubstituteBindings middleware by @WyattCast44 in https://github.com/spatie/laravel-permission/pull/2740
Other
- PHP 8.4 tests by @erikn69 in https://github.com/spatie/laravel-permission/pull/2747
- Fix comment typo by @machacekmartin in https://github.com/spatie/laravel-permission/pull/2753
New Contributors
- @ceilidhboy made their first contribution in https://github.com/spatie/laravel-permission/pull/2694
- @levizoesch made their first contribution in https://github.com/spatie/laravel-permission/pull/2705
- @galangaidilakbar made their first contribution in https://github.com/spatie/laravel-permission/pull/2719
- @KamilWojtalak made their first contribution in https://github.com/spatie/laravel-permission/pull/2723
- @marcleonhard made their first contribution in https://github.com/spatie/laravel-permission/pull/2741
- @WyattCast44 made their first contribution in https://github.com/spatie/laravel-permission/pull/2740
- @inserve-paul made their first contribution in https://github.com/spatie/laravel-permission/pull/2749
- @machacekmartin made their first contribution in https://github.com/spatie/laravel-permission/pull/2753
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.9.0...6.10.0
- Fix
-
6.9.022 Jun 2024Release notes
Open source →What's Changed
- Use
->withPivot()for teamed relationships (allowsgetPivotColumns()) by @juliangums in https://github.com/spatie/laravel-permission/pull/2679 - Update docblock on
$role->hasPermissionTo()to includeBackedEnumby @drbyte co-authored by @SanderMuller - [Docs] Clarify that
$guard_namecan be an array by @angelej in https://github.com/spatie/laravel-permission/pull/2659 - Fix misc typos in changelog by @szepeviktor in https://github.com/spatie/laravel-permission/pull/2686
New Contributors
- @angelej made their first contribution in https://github.com/spatie/laravel-permission/pull/2659
- @SanderMuller made their first contribution in #2676
- @szepeviktor made their first contribution in https://github.com/spatie/laravel-permission/pull/2686
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.8.0...6.9.0
- Use
-
6.8.021 Jun 2024Release notes
Open source →What's Changed
- Fix can't save the same model twice by @erikn69 in https://github.com/spatie/laravel-permission/pull/2658
- Fix phpstan from #2616 by @erikn69 in https://github.com/spatie/laravel-permission/pull/2685
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.7.0...6.8.0
-
6.7.019 Apr 2024Release notes
Open source →What's Changed
- Fixed remaining Octane event contract. Update to #2656 in release
6.5.0
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.6.0...6.7.0
- Fixed remaining Octane event contract. Update to #2656 in release
-
6.6.019 Apr 2024Release notes
Open source →What's Changed
- Roles: Support for casting role names to enums by @gajosadrian in https://github.com/spatie/laravel-permission/pull/2616
- Fix permission:show UUID error #2581 by @drbyte in https://github.com/spatie/laravel-permission/pull/2582
- Cover WildcardPermission instance verification based on its own guard (Allow hasAllPermissions and hasAnyPermission to run on custom guard for WildcardPermission) by @AlexandreBellas in https://github.com/spatie/laravel-permission/pull/2608
- Register Laravel "About" details by @drbyte in https://github.com/spatie/laravel-permission/pull/2584
New Contributors
- @gajosadrian made their first contribution in https://github.com/spatie/laravel-permission/pull/2616
- @AlexandreBellas made their first contribution in https://github.com/spatie/laravel-permission/pull/2608
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.5.0...6.6.0
-
6.5.018 Apr 2024Release notes
Open source →What's Changed
- Octane: Fix wrong event listener by @erikn69 in https://github.com/spatie/laravel-permission/pull/2656
- Teams: Add nullable team_id by @Androlax2 in https://github.com/spatie/laravel-permission/pull/2607
- Blade: simplify the definition of multiple Blade "if" directives by @alissn in https://github.com/spatie/laravel-permission/pull/2628
- DocBlocks: Update HasPermissions::collectPermissions() docblock by @Plytas in https://github.com/spatie/laravel-permission/pull/2641
Internals
- Update role-permissions.md by @killjin in https://github.com/spatie/laravel-permission/pull/2631
- Bump ramsey/composer-install from 2 to 3 by @dependabot in https://github.com/spatie/laravel-permission/pull/2630
- Bump dependabot/fetch-metadata from 1 to 2 by @dependabot in https://github.com/spatie/laravel-permission/pull/2642
New Contributors
- @alissn made their first contribution in https://github.com/spatie/laravel-permission/pull/2628
- @Androlax2 made their first contribution in https://github.com/spatie/laravel-permission/pull/2607
- @Plytas made their first contribution in https://github.com/spatie/laravel-permission/pull/2641
- @killjin made their first contribution in https://github.com/spatie/laravel-permission/pull/2631
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.4.0...6.5.0
-
6.4.028 Feb 2024Release notes
Open source →- Laravel 11 Support
What's Changed
- Add Laravel 11 to workflow run tests by @mraheelkhan in https://github.com/spatie/laravel-permission/pull/2605
- And Passport 12
Internals
- Update to use Larastan Org by @arnebr in https://github.com/spatie/laravel-permission/pull/2585
- laravel-pint-action to major version tag by @erikn69 in https://github.com/spatie/laravel-permission/pull/2586
New Contributors
- @arnebr made their first contribution in https://github.com/spatie/laravel-permission/pull/2585
- @mraheelkhan made their first contribution in https://github.com/spatie/laravel-permission/pull/2605
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.3.0...6.4.0
-
6.3.024 Dec 2023Release notes
Open source →What's Changed
- Octane Fix: Clear wildcard permissions on Tick in https://github.com/spatie/laravel-permission/pull/2583
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.2.0...6.3.0
-
6.2.009 Dec 2023Release notes
Open source →What's Changed
- Skip duplicates on sync (was triggering Integrity Constraint Violation error) by @erikn69 in https://github.com/spatie/laravel-permission/pull/2574
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.1.0...6.2.0
-
6.1.009 Nov 2023Release notes
Open source →What's Changed
-
Reset teamId on Octane by @erikn69 in https://github.com/spatie/laravel-permission/pull/2547 NOTE: The
\Spatie\Permission\Listeners\OctaneReloadPermissionslistener introduced in 6.0.0 is removed in 6.1.0, because the logic is directly incorporated into the ServiceProvider now.Thanks @jameshulse for the heads-up and code-review.
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.0.1...6.1.0
-
-
6.0.106 Nov 2023Release notes
Open source →What's Changed
- Provide a default team_foreign_key value in case config file isn't upgraded yet or teams feature is unused. Fixes #2535
- [Docs] Update unsetRelation() example in teams-permissions.md by @shdehnavi in https://github.com/spatie/laravel-permission/pull/2534
- [Docs] Update link in direct-permissions.md by @sevannerse in https://github.com/spatie/laravel-permission/pull/2539
New Contributors
- @sevannerse made their first contribution in https://github.com/spatie/laravel-permission/pull/2539
Full Changelog: https://github.com/spatie/laravel-permission/compare/6.0.0...6.0.1
-
6.0.025 Oct 2023Release notes
Open source →What's Changed
- Full uuid/guid/ulid support by @erikn69 in https://github.com/spatie/laravel-permission/pull/2089
- Refactor: Change static properties to non-static by @olivernybroe in https://github.com/spatie/laravel-permission/pull/2324
- Fix Role::withCount if belongsToMany declared by @xenaio-daniil in https://github.com/spatie/laravel-permission/pull/2280
- Fix: Lazily bind dependencies by @olivernybroe in https://github.com/spatie/laravel-permission/pull/2321
- Avoid loss of all permissions/roles pivots on sync error by @erikn69 in https://github.com/spatie/laravel-permission/pull/2341
- Fix delete permissions on Permissions Model by @erikn69 in https://github.com/spatie/laravel-permission/pull/2366
- Detach users on role/permission physical deletion by @erikn69 in https://github.com/spatie/laravel-permission/pull/2370
- Rename clearClassPermissions method to clearPermissionsCollection by @erikn69 in https://github.com/spatie/laravel-permission/pull/2369
- Use anonymous migrations (for L8+) by @erikn69 in https://github.com/spatie/laravel-permission/pull/2374
- [BC] Return string on getPermissionClass(), getRoleClass() by @erikn69 in https://github.com/spatie/laravel-permission/pull/2368
- Only offer publishing when running in console by @erikn69 in https://github.com/spatie/laravel-permission/pull/2377
- Don't add commands in web interface context by @angeljqv in https://github.com/spatie/laravel-permission/pull/2405
- [BC] Fix Role->hasPermissionTo() signature to match HasPermissions trait by @erikn69 in https://github.com/spatie/laravel-permission/pull/2380
- Force that getPermissionsViaRoles, hasPermissionViaRole must be used only by authenticable by @erikn69 in https://github.com/spatie/laravel-permission/pull/2382
- fix BadMethodCallException: undefined methods hasAnyRole, hasAnyPermissions by @erikn69 in https://github.com/spatie/laravel-permission/pull/2381
- Add PHPStan workflow with fixes by @erikn69 in https://github.com/spatie/laravel-permission/pull/2376
- Add BackedEnum support by @drbyte in https://github.com/spatie/laravel-permission/pull/2391
- Drop PHP 7.3 support by @angeljqv in https://github.com/spatie/laravel-permission/pull/2388
- Drop PHP 7.4 support by @drbyte in https://github.com/spatie/laravel-permission/pull/2485
- Test against PHP 8.3 by @erikn69 in https://github.com/spatie/laravel-permission/pull/2512
- Fix call to an undefined method Role::getRoleClass by @erikn69 in https://github.com/spatie/laravel-permission/pull/2411
- Remove force loading model relationships by @erikn69 in https://github.com/spatie/laravel-permission/pull/2412
- Test alternate cache drivers by @erikn69 in https://github.com/spatie/laravel-permission/pull/2416
- Use attach instead of sync on traits by @erikn69 in https://github.com/spatie/laravel-permission/pull/2420
- Fewer sqls in syncRoles, syncPermissions by @erikn69 in https://github.com/spatie/laravel-permission/pull/2423
- Add middleware using static method by @jnoordsij in https://github.com/spatie/laravel-permission/pull/2424
- Update PHPDocs for IDE autocompletion by @erikn69 in https://github.com/spatie/laravel-permission/pull/2437
- [BC] Wildcard permissions algorithm performance improvements (ALERT: Breaking Changes) by @danharrin in https://github.com/spatie/laravel-permission/pull/2445
- Add withoutRole and withoutPermission scopes by @drbyte in https://github.com/spatie/laravel-permission/pull/2463
- Add support for service-to-service Passport client by @SuperDJ in https://github.com/spatie/laravel-permission/pull/2467
- Register OctaneReloadPermissions listener for Laravel Octane by @erikn69 in https://github.com/spatie/laravel-permission/pull/2403
- Add guard name to exceptions by @drbyte in https://github.com/spatie/laravel-permission/pull/2481
- Update contracts to allow for UUID by @drbyte in https://github.com/spatie/laravel-permission/pull/2480
- Avoid triggering eloquent.retrieved event by @erikn69 in https://github.com/spatie/laravel-permission/pull/2498
- [BC] Rename "Middlewares" namespace to "Middleware" by @drbyte in https://github.com/spatie/laravel-permission/pull/2499
@haspermissiondirective by @axlwild in https://github.com/spatie/laravel-permission/pull/2515- Add guard parameter to can() by @drbyte in https://github.com/spatie/laravel-permission/pull/2526
New Contributors
- @xenaio-daniil made their first contribution in https://github.com/spatie/laravel-permission/pull/2280
- @JensvandeWiel made their first contribution in https://github.com/spatie/laravel-permission/pull/2336
- @fsamapoor made their first contribution in https://github.com/spatie/laravel-permission/pull/2361
- @yungifez made their first contribution in https://github.com/spatie/laravel-permission/pull/2394
- @HasanEksi made their first contribution in https://github.com/spatie/laravel-permission/pull/2418
- @jnoordsij made their first contribution in https://github.com/spatie/laravel-permission/pull/2424
- @danharrin made their first contribution in https://github.com/spatie/laravel-permission/pull/2445
- @SuperDJ made their first contribution in https://github.com/spatie/laravel-permission/pull/2467
- @ChillMouse made their first contribution in https://github.com/spatie/laravel-permission/pull/2438
- @Okipa made their first contribution in https://github.com/spatie/laravel-permission/pull/2492
- @edalzell made their first contribution in https://github.com/spatie/laravel-permission/pull/2494
- @sirosfakhri made their first contribution in https://github.com/spatie/laravel-permission/pull/2501
- @juliangums made their first contribution in https://github.com/spatie/laravel-permission/pull/2516
- @nnnnnnnngu made their first contribution in https://github.com/spatie/laravel-permission/pull/2524
- @axlwild made their first contribution in https://github.com/spatie/laravel-permission/pull/2515
- @shdehnavi made their first contribution in https://github.com/spatie/laravel-permission/pull/2527
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.11.1...6.0.0
-
5.11.125 Oct 2023Release notes
Open source →No functional changes. Just several small updates to the Documentation.
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.11.0...5.11.1
-
5.11.030 Aug 2023Release notes
Open source →What's Changed
- [V5] Avoid triggering
eloquent.retrievedevent by @erikn69 in https://github.com/spatie/laravel-permission/pull/2490
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.10.2...5.11.0
- [V5] Avoid triggering
-
5.10.204 Jul 2023Release notes
Open source →What's Changed
- Fix Eloquent Strictness on
permission:showCommand by @erikn69 in https://github.com/spatie/laravel-permission/pull/2457
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.10.1...5.10.2
- Fix Eloquent Strictness on
-
5.10.112 Apr 2023Release notes
Open source →What's Changed
- [V5] Fix artisan command
permission:showoutput of roles with underscores by @erikn69 in https://github.com/spatie/laravel-permission/pull/2396
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.10.0...5.10.1
- [V5] Fix artisan command
-
5.10.022 Mar 2023Release notes
Open source →What's Changed
- Fix delete permissions on Permissions Model by @erikn69 in https://github.com/spatie/laravel-permission/pull/2366
-
5.9.106 Feb 2023Release notes
Open source →Apologies for the break caused by 5.9.0 !
Reverted Lazy binding of dependencies.
- Revert "fix: Lazily bind dependencies", originally #2309
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.9.0...5.9.1
-
5.9.006 Feb 2023Release notes
Open source →What's Changed
- Add
permission-prefix to publish tag names by @sedehi in https://github.com/spatie/laravel-permission/pull/2301 - Fix detaching user models on teams feature #2220 by @erikn69 in https://github.com/spatie/laravel-permission/pull/2221
- Hint model properties by @AJenbo in https://github.com/spatie/laravel-permission/pull/2230
- Custom wildcard verification/separators support by @erikn69 in https://github.com/spatie/laravel-permission/pull/2252
- fix: Lazily bind dependencies by @olivernybroe in https://github.com/spatie/laravel-permission/pull/2309
- Extract query to
getPermissionsWithRolesmethod. by @xiCO2k in https://github.com/spatie/laravel-permission/pull/2316 - This will allow to extend the PermissionRegistrar class and change the query.
New Contributors
- @sedehi made their first contribution in https://github.com/spatie/laravel-permission/pull/2301
- @parallels999 made their first contribution in https://github.com/spatie/laravel-permission/pull/2265
- @AJenbo made their first contribution in https://github.com/spatie/laravel-permission/pull/2230
- @olivernybroe made their first contribution in https://github.com/spatie/laravel-permission/pull/2309
- @xiCO2k made their first contribution in https://github.com/spatie/laravel-permission/pull/2316
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.8.0...5.9.0
- Add
-
5.8.014 Jan 2023Release notes
Open source →What's Changed
- Laravel 10.x Support by @erikn69 in https://github.com/spatie/laravel-permission/pull/2298
Administrative
- [Docs] Link updated to match name change of related tool repo by @aliqasemzadeh in https://github.com/spatie/laravel-permission/pull/2253
- Fix tests badge by @erikn69 in https://github.com/spatie/laravel-permission/pull/2300
- Add Laravel Pint Support by @patinthehat in https://github.com/spatie/laravel-permission/pull/2269
- Normalize composer.json by @patinthehat in https://github.com/spatie/laravel-permission/pull/2259
- Add Dependabot Automation by @patinthehat in https://github.com/spatie/laravel-permission/pull/2257
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.7.0...5.8.0
-
5.7.023 Nov 2022Release notes
Open source →What's Changed
- [Bugfix] Avoid checking permissions-via-roles on
Rolemodel (refModel::preventAccessingMissingAttributes()) by @juliomotol in https://github.com/spatie/laravel-permission/pull/2227
New Contributors
- @juliomotol made their first contribution in https://github.com/spatie/laravel-permission/pull/2227
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.6.0...5.7.0
- [Bugfix] Avoid checking permissions-via-roles on
-
5.6.019 Nov 2022Release notes
Open source →What's Changed
- No longer throws an exception when checking
hasAllPermissions()if the permission name does not exist by @mtawil in https://github.com/spatie/laravel-permission/pull/2248
Doc Updates
- [Docs] Add syncPermissions() in role-permissions.md by @xorinzor in https://github.com/spatie/laravel-permission/pull/2235
- [Docs] Fix broken Link that link to freek's blog post by @chengkangzai in https://github.com/spatie/laravel-permission/pull/2234
New Contributors
- @xorinzor made their first contribution in https://github.com/spatie/laravel-permission/pull/2235
- @chengkangzai made their first contribution in https://github.com/spatie/laravel-permission/pull/2234
- @mtawil made their first contribution in https://github.com/spatie/laravel-permission/pull/2248
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.5.16...5.6.0
- No longer throws an exception when checking
-
5.5.1623 Oct 2022Release notes
Open source →What's Changed
- optimize
forloop in WildcardPermission by @SubhanSh in https://github.com/spatie/laravel-permission/pull/2113
New Contributors
- @SubhanSh made their first contribution in https://github.com/spatie/laravel-permission/pull/2113
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.5.15...5.5.16
- optimize
-
5.5.1523 Oct 2022Release notes
Open source →Autocomplete all Blade directives via Laravel Idea plugin
What's Changed
- Autocomplete all Blade directives via Laravel Idea plugin by @maartenpaauw in https://github.com/spatie/laravel-permission/pull/2210
- Add tests for display roles/permissions on UnauthorizedException by @erikn69 in https://github.com/spatie/laravel-permission/pull/2228
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.5.14...5.5.15
-
5.5.1421 Oct 2022Release notes
Open source →FIXED BREAKING CHANGE. (Sorry about that!)
What's Changed
- Revert "Avoid calling the config helper in the role/perm model constructor" by @drbyte in https://github.com/spatie/laravel-permission/pull/2225
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.5.13...5.5.14
-
5.5.1321 Oct 2022Release notes
Open source →What's Changed
- fix UnauthorizedException: Wrong configuration was used in forRoles by @Sy-Dante in https://github.com/spatie/laravel-permission/pull/2224
New Contributors
- @Sy-Dante made their first contribution in https://github.com/spatie/laravel-permission/pull/2224
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.5.12...5.5.13
-
5.5.1219 Oct 2022Release notes
Open source →Fix regression introduced in
5.5.10What's Changed
- Fix undefined index guard_name by @erikn69 in https://github.com/spatie/laravel-permission/pull/2219
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.5.11...5.5.12
-
5.5.1119 Oct 2022Release notes
Open source →What's Changed
- Support static arrays on blade directives by @erikn69 in https://github.com/spatie/laravel-permission/pull/2168
Full Changelog: https://github.com/spatie/laravel-permission/compare/5.5.10...5.5.11