MyGit

spatie/laravel-permission

Fork: 1785 Star: 12223 (更新于 2024-12-13 08:26:42)

license: MIT

Language: PHP .

Associate users with roles and permissions

最后发布版本: 6.9.0 ( 2024-06-23 07:26:24)

官方网址 GitHub网址

Social Card of 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 installation and usage instructions.

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.

And a special thanks to Caneco for the logo ✨

Alternatives

License

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

最近版本更新:(数据更新于 2024-10-15 22:25:33)

2024-06-23 07:26:24 6.9.0

2024-06-22 07:51:47 6.8.0

2024-04-19 20:38:42 6.7.0

2024-04-19 11:55:21 6.6.0

2024-04-19 05:54:10 6.5.0

2024-02-28 16:14:06 6.4.0

2023-12-24 14:59:46 6.3.0

2023-12-09 09:41:57 6.2.0

2023-11-10 06:06:22 6.1.0

2023-11-07 03:31:04 6.0.1

主题(topics):

laravel, permission, php, secure

spatie/laravel-permission同语言 PHP最近更新仓库

2024-12-27 18:22:47 coollabsio/coolify

2024-12-25 16:01:12 w7corp/easywechat

2024-12-11 20:15:22 symfony/symfony

2024-11-29 16:49:37 symfony/var-dumper

2024-11-20 23:58:25 laravel/framework

2024-11-20 18:39:23 danielmiessler/SecLists