Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Permission Laravel Package

spatie/laravel-permission

Manage roles and permissions in Laravel using database-backed models integrated with Laravel’s Gate. Assign roles to users, grant permissions directly or via roles, and authorize actions with the familiar can() checks. Includes docs for setup and usage.

View on GitHub
Deep Wiki
Context7
7.3.0

What's Changed

Downgraded PHP requirement to 8.3.

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/7.2.4...7.3.0

7.2.4

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/7.2.3...7.2.4

6.25.0

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.24.1...6.25.0

7.2.3
  • Update config comments to point to new v7 event class names
7.2.2

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/7.2.1...7.2.2

7.2.1

What's Changed

  • Add Laravel 13 support
  • Upgrade to laravel/passport ^13.0
  • Drop prefer-lowest from CI matrix
7.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/7.1.0...7.2.0

7.0.0

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

6.24.1

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.24.0...6.24.1

6.24.0

What's Changed

Internals/Testing

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.23.0...6.24.0

6.23.0

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.22.0...6.23.0

6.22.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.21.0...6.22.0

6.21.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.20.0...6.21.0

6.20.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.19.0...6.20.0

6.19.0

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.18.0...6.19.0

6.18.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.17.0...6.18.0

6.17.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.16.0...6.17.0

6.16.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.15.0...6.16.0

6.15.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.14.0...6.15.0

6.14.0

What's Changed

Internals

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.13.0...6.14.0

6.13.0

What's Changed

New Contributors

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

6.12.0

What's Changed

  • Support Laravel 12

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

6.11.0

What's Changed

Internals

Documentation Updates

New Contributors

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

6.10.1

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.10.0...6.10.1

6.10.0

What's Changed

Docs

Other

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.9.0...6.10.0

6.9.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.8.0...6.9.0

6.7.0

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

6.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.5.0...6.6.0

6.5.0

What's Changed

Internals

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.4.0...6.5.0

6.4.0
  • Laravel 11 Support

What's Changed

Internals

New Contributors

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.3.0...6.4.0

6.3.0

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.2.0...6.3.0

6.2.0

What's Changed

Full Changelog: https://github.com/spatie/laravel-permission/compare/6.1.0...6.2.0

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport