PackageTrack
Sign in Get early access

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 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 224
  1. 8.3.0 03 Jul 2026
    Release notes

    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

    Open source →
    Release notes

    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

    Open source →
  2. 8.2.0 02 Jul 2026
    Release notes

    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)) on roles()/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/deleted hooks to react to role/permission removal under teams, those hooks were already unreliable in this scenario and remain out of scope — switch to listening for RoleDetachedEvent / PermissionDetachedEvent instead.
    • revokePermissionTo() can now throw GuardDoesNotMatch in rare cases where it previously wouldn't have, as a side effect of routing through the same guard-check used by givePermissionTo(). 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

    Open source →
    Release notes

    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)) on roles()/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/deleted hooks to react to role/permission removal under teams, those hooks were already unreliable in this scenario and remain out of scope — switch to listening for RoleDetachedEvent / PermissionDetachedEvent instead.
    • revokePermissionTo() can now throw GuardDoesNotMatch in rare cases where it previously wouldn't have, as a side effect of routing through the same guard-check used by givePermissionTo(). 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

    Open source →
  3. 8.1.0 27 Jun 2026
    Release notes

    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

    New Contributors

    Full Changelog: 8.0.0...8.1.0

    Open source →
  4. 8.0.0 30 May 2026
    Release notes

    What's Changed

    Full Changelog: 7.4.2...8.0.0

    Open source →
    Release notes
    • Updated contracts to allow more thorough BackedEnum support.
    Open source →
  5. 7.4.2 30 May 2026
    Release notes

    What's Changed

    • Remove stale phpstan ignore HasPermission instanceof.alwaysFalse by @YasserB94 in #2952

    Full Changelog: 7.4.1...7.4.2

    Open source →
    Release notes

    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

    Open source →
  6. 7.4.1 29 Apr 2026
    Release notes

    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

    Open source →
    Release notes

    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

    Open source →
  7. 7.4.0 28 Apr 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 7.3.0...7.4.0

    Open source →
    Release notes

    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

    Open source →
  8. 7.3.0 07 Apr 2026
    Release notes

    What's Changed

    Downgraded PHP requirement to 8.3.

    New Contributors

    Full Changelog: 7.2.4...7.3.0

    Open source →
    Release notes

    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

    Open source →
  9. 7.2.4 17 Mar 2026
    Release notes

    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

    Open source →
    Release notes

    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

    Open source →
  10. 7.2.3 23 Feb 2026
    Release notes
    • Update config comments to point to new v7 event class names
    Open source →
  11. 7.2.2 22 Feb 2026
    Release notes

    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

    Open source →
  12. 7.2.1 21 Feb 2026
    Release notes

    What's Changed

    • Add Laravel 13 support
    • Upgrade to laravel/passport ^13.0
    • Drop prefer-lowest from CI matrix
    Open source →
  13. 7.2.0 16 Feb 2026
    Release notes

    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

    Open source →
  14. 7.1.0 14 Feb 2026
    Release notes

    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

    Open source →
  15. 7.0.0 11 Feb 2026
    Release notes

    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 PackageServiceProvider from spatie/laravel-package-tools
    • Removed Lumen support

    Class renames

    • Event classes now have an Event suffix (PermissionAttachedPermissionAttachedEvent, etc.)
    • Command classes now have a Command suffix (CacheResetCacheResetCommand, 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 X
    • get_class($obj)$obj::class
    • strpos($x, $y) !== falsestr_contains($x, $y)
    • Constructor promotion in WildcardPermission
    • Proper use imports for global classes

    Cleanup

    • Removed deprecated clearClassPermissions() method
    • Removed __construct from Wildcard contract
    • 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

    Open source →
  16. 6.25.0 17 Mar 2026
    Release notes

    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

    Open source →
    Release notes

    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

    Open source →
  17. 6.24.1 09 Feb 2026
    Release notes

    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

    Open source →
  18. 6.24.0 13 Dec 2025
    Release notes

    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 null as 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

    Open source →
  19. 6.23.0 03 Nov 2025
    Release notes

    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

    Open source →
  20. 6.22.0 27 Oct 2025
    Release notes

    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

    Open source →
  21. 6.21.0 23 Jul 2025
    Release notes

    What's Changed

    • Allow removing multiple roles with the removeRole method by @TobMoeller in https://github.com/spatie/laravel-permission/pull/2859
    • [Docs] Correct middleware order for documentation example in teams-permissions.md by @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

    Open source →
  22. 6.20.0 05 Jun 2025
    Release notes

    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

    Open source →
  23. 6.19.0 31 May 2025
    Release notes

    What's Changed

    • Revert "Remove collectPermissions that 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

    Open source →
  24. 6.18.0 14 May 2025
    Release notes

    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 on wildcard_permission key 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 collectPermissions that 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

    Open source →
  25. 6.17.0 08 Apr 2025
    Release notes

    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

    Open source →
  26. 6.16.0 28 Feb 2025
    Release notes

    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

    Open source →
  27. 6.15.0 17 Feb 2025
    Release notes

    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

    Open source →
  28. 6.14.0 13 Feb 2025
    Release notes

    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

    Open source →
  29. 6.13.0 05 Feb 2025
    Release notes

    What's Changed

    • LazyLoading: Explicitly call loadMissing('permissions') when the relation is needed, and test with Model::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

    Open source →
  30. 6.12.0 31 Jan 2025
    Release notes

    What's Changed

    • Support Laravel 12

    Full Changelog: https://github.com/spatie/laravel-permission/compare/6.11.0...6.12.0

    Open source →
  31. 6.11.0 30 Jan 2025
    Release notes

    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

    Open source →
  32. 6.10.1 08 Nov 2024
    Release notes

    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

    Open source →
  33. 6.10.0 05 Nov 2024
    Release notes

    What's Changed

    • Fix GuardDoesNotMatch should accept collection by @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 exists and forgetCachedPermissions fails 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 Larastan in dev by @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

    Open source →
  34. 6.9.0 22 Jun 2024
    Release notes

    What's Changed

    • Use ->withPivot() for teamed relationships (allows getPivotColumns()) by @juliangums in https://github.com/spatie/laravel-permission/pull/2679
    • Update docblock on $role->hasPermissionTo() to include BackedEnum by @drbyte co-authored by @SanderMuller
    • [Docs] Clarify that $guard_name can 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

    Open source →
  35. 6.8.0 21 Jun 2024
    Release notes

    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

    Open source →
  36. 6.7.0 19 Apr 2024
    Release notes

    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

    Open source →
  37. 6.6.0 19 Apr 2024
    Release notes

    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

    Open source →
  38. 6.5.0 18 Apr 2024
    Release notes

    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

    Open source →
  39. 6.4.0 28 Feb 2024
    Release notes
    • 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

    Open source →
  40. 6.3.0 24 Dec 2023
    Release notes

    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

    Open source →
  41. 6.2.0 09 Dec 2023
    Release notes

    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

    Open source →
  42. 6.1.0 09 Nov 2023
    Release notes

    What's Changed

    • Reset teamId on Octane by @erikn69 in https://github.com/spatie/laravel-permission/pull/2547 NOTE: The \Spatie\Permission\Listeners\OctaneReloadPermissions listener 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

    Open source →
  43. 6.0.1 06 Nov 2023
    Release notes

    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

    Open source →
  44. 6.0.0 25 Oct 2023
    Release notes

    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
    • @haspermission directive 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

    Open source →
  45. 5.11.1 25 Oct 2023
    Release notes

    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

    Open source →
  46. 5.11.0 30 Aug 2023
    Release notes

    What's Changed

    • [V5] Avoid triggering eloquent.retrieved event 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

    Open source →
  47. 5.10.2 04 Jul 2023
    Release notes

    What's Changed

    • Fix Eloquent Strictness on permission:show Command 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

    Open source →
  48. 5.10.1 12 Apr 2023
    Release notes

    What's Changed

    • [V5] Fix artisan command permission:show output 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

    Open source →
  49. 5.10.0 22 Mar 2023
    Release notes

    What's Changed

    • Fix delete permissions on Permissions Model by @erikn69 in https://github.com/spatie/laravel-permission/pull/2366
    Open source →
  50. 5.9.1 06 Feb 2023
    Release notes

    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

    Open source →
  51. 5.9.0 06 Feb 2023
    Release notes

    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 getPermissionsWithRoles method. 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

    Open source →
  52. 5.8.0 14 Jan 2023
    Release notes

    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

    Open source →
  53. 5.7.0 23 Nov 2022
    Release notes

    What's Changed

    • [Bugfix] Avoid checking permissions-via-roles on Role model (ref Model::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

    Open source →
  54. 5.6.0 19 Nov 2022
    Release notes

    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

    Open source →
  55. 5.5.16 23 Oct 2022
    Release notes

    What's Changed

    • optimize for loop 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

    Open source →
  56. 5.5.15 23 Oct 2022
    Release notes

    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

    Open source →
  57. 5.5.14 21 Oct 2022
    Release notes

    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

    Open source →
  58. 5.5.13 21 Oct 2022
    Release notes

    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

    Open source →
  59. 5.5.12 19 Oct 2022
    Release notes

    Fix regression introduced in 5.5.10

    What'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

    Open source →
  60. 5.5.11 19 Oct 2022
    Release notes

    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

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive