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

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

《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 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

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

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

试试 Laravel-Permission

5年前 评论
张无忌

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

5年前 评论

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

5年前 评论
张无忌

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

file

5年前 评论

@rivers

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

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

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

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

5年前 评论
张无忌

@zhouzishu 谢谢

5年前 评论

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