谁有 "zizaco/entrust": "dev-Laravel-5" 这个插件的基本语法的链接

谁有 "zizaco/entrust": "dev-laravel-5" 这个插件的基本语法的链接

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
最佳答案

spatie/laravel-permission(推荐)

这个是首选,值得考虑。

GitHub: https://github.com/spatie/laravel-permissi...

文档/demo: https://docs.spatie.be/laravel-permission/...

santigarcor/laratrust

另外,如果喜欢 entrust 的风格,不妨考虑这款 entrust 的改良版,语法类似,支持更多功能。

GitHub: https://github.com/santigarcor/laratrust

文档/demo: https://laratrust.santigarcor.me/

补充

Summer 大大的旧版论坛项目 phphub5 中有用到 entrust ,也可做参考。

GitHub: https://github.com/summerblue/phphub5

4年前 评论
讨论数量: 7
Epona

这个包2年未更新了,弃坑吧。

试试 Laravel-Permission

4年前 评论
张无忌

@Epona 没有demo呀 网上的demo有的都运行不了

4年前 评论

spatie/laravel-permission(推荐)

这个是首选,值得考虑。

GitHub: https://github.com/spatie/laravel-permissi...

文档/demo: https://docs.spatie.be/laravel-permission/...

santigarcor/laratrust

另外,如果喜欢 entrust 的风格,不妨考虑这款 entrust 的改良版,语法类似,支持更多功能。

GitHub: https://github.com/santigarcor/laratrust

文档/demo: https://laratrust.santigarcor.me/

补充

Summer 大大的旧版论坛项目 phphub5 中有用到 entrust ,也可做参考。

GitHub: https://github.com/summerblue/phphub5

4年前 评论
张无忌

@zhouzishu 这个文档我看过 我是刚接触laravel的 一直不明白这个$user怎么来的

file

4年前 评论

@rivers

$user = \App\User::find(1); // 1 为用户id
$user->...;

$user 为用户模型对象,默认在 App\User

初学 laravel 可先熟读文档: 《Laravel 5.8 中文文档》

也可通过购买一本实战书籍: 《L01 Laravel 教程 - Web 开发实战入门 ( Laravel 5.8 )》

4年前 评论
张无忌

@zhouzishu 谢谢

4年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!