spatie/laravel-permission

PHPspatie.be/docs/laravel-permission

Associate users with roles and permissions

laravelphppermissionsecure
Star 增长趋势
Star
13k
Forks
1.8k
周增长
+-2
Issues
0
5k10k
2015年9月2019年5月2023年1月2026年9月
制品库Packagist
README
Logo for laravel-permission

Associate users with permissions and roles

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Documentation, Installation, and Usage Instructions

See the documentation for detailed instructions for how-to-use, as well as installation and upgrade guidance.

What It Does

This package allows you to manage user permissions and roles in a database.

Once installed you can do stuff like this:

// Adding permissions to a user
$user->givePermissionTo('edit articles');

// Adding permissions via a role
$user->assignRole('writer');

$role->givePermissionTo('edit articles');

Because all permissions will be registered on Laravel's gate, you can check if a user has a permission with Laravel's default can function:

$user->can('edit articles');

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Testing

composer test

Security

If you discover any security-related issues, please email security@spatie.be instead of using the issue tracker.

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

We publish all received postcards on our company website.

Credits

This package is heavily based on Jeffrey Way's awesome Laracasts lessons on permissions and roles. His original code can be found in this repo on GitHub.

Special thanks to Alex Vanderbist who greatly helped with v2, and to Chris Brown for his longtime support helping us maintain the package.

Special thanks to Caneco for the original logo.

Alternatives

License

The MIT License (MIT). Please see License File for more information.

相关仓库
shadcn-ui/ui

A set of beautifully-designed, accessible components and a code distribution platform. Works with your favorite frameworks. Open Source. Open Code.

TypeScriptnpmMIT Licensecomponentsnextjs
ui.shadcn.com
123.4k10.2k
laravel/laravel

Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

Bladelibraryphpframework
laravel.com
84.9k24.9k
coollabsio/coolify

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 280+ one-click services on your own servers.

PHPPackagistApache License 2.0nodejsmysql
coolify.io
61.6k5.4k
laravel/framework

Laravel is a web application framework with expressive, elegant syntax.

PHPPackagistlibraryMIT Licensephpframework
laravel.com
34.9k12k
filamentphp/filament

A powerful open-source UI framework for Laravel • Build and ship apps & admin panels fast with Livewire

PHPPackagistlibraryMIT Licenselaraveltailwind-css
filamentphp.com
32k4.2k
bagisto/bagisto

Open Source eCommerce & Multi-Vendor Marketplace Platform Built with Laravel for Enterprise-Scale Commerce, Supporting 10M+ SKUs

PHPPackagistappMIT Licenseecommerce-frameworklaravel
bagisto.com
28.1k3.3k
monicahq/monica

Personal CRM. Remember everything about your friends, family and business relationships.

PHPPackagistappGNU Affero General Public License v3.0laravelcrm
beta.monicahq.com
25.3k2.6k
krayin/laravel-crm

Krayin CRM is Free & Open Source CRM Built with Laravel for Customer, Lead, and Sales Management.

PHPPackagistMIT Licensephplaravel
krayincrm.com
23.8k1.6k
fruitcake/laravel-debugbar

Debugbar for Laravel (Integrates PHP Debug Bar)

PHPPackagistlibraryMIT Licenselaraveldebugbar
laraveldebugbar.com
19.3k1.6k
BookStackApp/BookStack

NOW MANAGED ON CODEBERG

PHPPackagistMIT Licensebookstacklaravel
codeberg.org/bookstack/bookstack
19k2.4k
koel/koel

Music streaming solution that works.

PHPPackagistMIT Licenselaravelvue
koel.dev
17.2k2.1k
flarum/flarum

Simple forum software for building great communities.

PHPPackagistappMIT Licensephpforum
flarum.org
16.4k1.7k