承接 bfe/laravel-permission 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bfe/laravel-permission

最新稳定版本:0.0.1

Composer 安装命令:

composer require bfe/laravel-permission

包简介

Permission handling for Laravel 6.0 and up

README 文档

README

Documentation, Installation, and Usage Instructions

To get started with using the package, we'll install it using the following command:

composer require bfe/laravel-permission

Now that we've installed the package, we'll need to publish the database migration and config file:

php artisan vendor:publish --provider="Bfe\Permission\PermissionServiceProvider"

We can now run the migrations to create the new tables in our database:

php artisan migrate

Assuming that we are using the default config values and haven't changed anything in the package's config/permission.php, we should now have five new tables in our database:

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');

Testing

composer test

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1825
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固