[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8144":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":15,"starSnapshotCount":15,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},8144,"laravel-permission","spatie\u002Flaravel-permission","spatie","Associate users with roles and permissions","https:\u002F\u002Fspatie.be\u002Fdocs\u002Flaravel-permission",null,"PHP",12906,1824,187,0,10,31,3,44.78,"MIT License",false,"main",[24,25,26,27],"laravel","permission","php","secure","2026-06-12 02:01:49","\u003Cdiv align=\"left\">\n    \u003Ca href=\"https:\u002F\u002Fspatie.be\u002Fopen-source?utm_source=github&utm_medium=banner&utm_campaign=laravel-permission\">\n      \u003Cpicture>\n        \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fspatie.be\u002Fpackages\u002Fheader\u002Flaravel-permission\u002Fhtml\u002Fdark.webp\">\n        \u003Cimg alt=\"Logo for laravel-permission\" src=\"https:\u002F\u002Fspatie.be\u002Fpackages\u002Fheader\u002Flaravel-permission\u002Fhtml\u002Flight.webp\">\n      \u003C\u002Fpicture>\n    \u003C\u002Fa>\n\n\u003Ch1>Associate users with permissions and roles\u003C\u002Fh1>\n\n[![Latest Version on Packagist](https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fv\u002Fspatie\u002Flaravel-permission.svg?style=flat-square)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fspatie\u002Flaravel-permission)\n[![GitHub Tests Action Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fspatie\u002Flaravel-permission\u002Frun-tests.yml?branch=main&label=Tests)](https:\u002F\u002Fgithub.com\u002Fspatie\u002Flaravel-permission\u002Factions?query=workflow%3ATests+branch%3Amain)\n[![Total Downloads](https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fdt\u002Fspatie\u002Flaravel-permission.svg?style=flat-square)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fspatie\u002Flaravel-permission)\n    \n\u003C\u002Fdiv>\n\n## Documentation, Installation, and Usage Instructions\n\nSee the [documentation](https:\u002F\u002Fspatie.be\u002Fdocs\u002Flaravel-permission\u002F) for detailed instructions for how-to-use, as well as installation and upgrade guidance.\n\n## What It Does\nThis package allows you to manage user permissions and roles in a database.\n\nOnce installed you can do stuff like this:\n\n```php\n\u002F\u002F Adding permissions to a user\n$user->givePermissionTo('edit articles');\n\n\u002F\u002F Adding permissions via a role\n$user->assignRole('writer');\n\n$role->givePermissionTo('edit articles');\n```\n\nBecause all permissions will be registered on [Laravel's gate](https:\u002F\u002Flaravel.com\u002Fdocs\u002Fauthorization), you can check if a user has a permission with Laravel's default `can` function:\n\n```php\n$user->can('edit articles');\n```\n\n## Support us\n\n[\u003Cimg src=\"https:\u002F\u002Fgithub-ads.s3.eu-central-1.amazonaws.com\u002Flaravel-permission.jpg?t=1\" width=\"419px\" \u002F>](https:\u002F\u002Fspatie.be\u002Fgithub-ad-click\u002Flaravel-permission)\n\nWe invest a lot of resources into creating [best in class open source packages](https:\u002F\u002Fspatie.be\u002Fopen-source). You can support us by [buying one of our paid products](https:\u002F\u002Fspatie.be\u002Fopen-source\u002Fsupport-us).\n\nWe 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](https:\u002F\u002Fspatie.be\u002Fabout-us). We publish all received postcards on [our virtual postcard wall](https:\u002F\u002Fspatie.be\u002Fopen-source\u002Fpostcards).\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https:\u002F\u002Fgithub.com\u002Fspatie\u002F.github\u002Fblob\u002Fmain\u002FCONTRIBUTING.md) for details.\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n### Security\n\nIf you discover any security-related issues, please email [security@spatie.be](mailto:security@spatie.be) instead of using the issue tracker.\n\n## Postcardware\n\nYou'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.\n\nOur address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.\n\nWe publish all received postcards [on our company website](https:\u002F\u002Fspatie.be\u002Fen\u002Fopensource\u002Fpostcards).\n\n## Credits\n\n- [Chris Brown](https:\u002F\u002Fgithub.com\u002Fdrbyte)\n- [Freek Van der Herten](https:\u002F\u002Fgithub.com\u002Ffreekmurze)\n- [All Contributors](..\u002F..\u002Fcontributors)\n\nThis package is heavily based on [Jeffrey Way](https:\u002F\u002Ftwitter.com\u002Fjeffrey_way)'s awesome [Laracasts](https:\u002F\u002Flaracasts.com) lessons\non [permissions and roles](https:\u002F\u002Flaracasts.com\u002Fseries\u002Fwhats-new-in-laravel-5-1\u002Fepisodes\u002F16). His original code\ncan be found [in this repo on GitHub](https:\u002F\u002Fgithub.com\u002Flaracasts\u002Flaravel-5-roles-and-permissions-demo).\n\nSpecial thanks to [Alex Vanderbist](https:\u002F\u002Fgithub.com\u002FAlexVanderbist) who greatly helped with `v2`, and to [Chris Brown](https:\u002F\u002Fgithub.com\u002Fdrbyte) for his longtime support  helping us maintain the package.\n\nSpecial thanks to [Caneco](https:\u002F\u002Ftwitter.com\u002Fcaneco) for the original logo.\n\n## Alternatives\n\n- [Povilas Korop](https:\u002F\u002Ftwitter.com\u002F@povilaskorop) did an excellent job listing the alternatives [in an article on Laravel News](https:\u002F\u002Flaravel-news.com\u002Ftwo-best-roles-permissions-packages). In that same article, he compares laravel-permission to [Joseph Silber](https:\u002F\u002Fgithub.com\u002FJosephSilber)'s [Bouncer](https:\u002F\u002Fgithub.com\u002FJosephSilber\u002Fbouncer), which in our book is also an excellent package.\n- [santigarcor\u002Flaratrust](https:\u002F\u002Fgithub.com\u002Fsantigarcor\u002Flaratrust) implements team support\n- [ultraware\u002Froles](https:\u002F\u002Fgithub.com\u002Fultraware\u002Froles) (archived) takes a slightly different approach to its features.\n- [zizaco\u002Fentrust](https:\u002F\u002Fgithub.com\u002Fzizaco\u002Fentrust) offers some wildcard pattern matching\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","spatie\u002Flaravel-permission 是一个用于在 Laravel 应用中管理用户权限和角色的 PHP 包。其核心功能包括为用户分配权限、通过角色来管理用户的权限集合，并且所有这些权限都会注册到 Laravel 的授权门上，从而可以使用 Laravel 自带的 `can` 方法来检查用户的权限。该包支持灵活的权限与角色关联方式，使得开发者能够轻松地实现复杂的权限控制逻辑。适用于需要细粒度访问控制的应用场景，如内容管理系统、后台管理系统等。",2,"2026-06-11 03:16:22","top_language"]