kawsuj/knock 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

kawsuj/knock

Composer 安装命令:

composer require kawsuj/knock

包简介

Provides role-based application permissions for Laravel applications using security tags

README 文档

README

Description

Provides a simple framework for Laravel 5.2 projects requiring user roles and permissions. It includes a user interface to manage your application's users and their permitted actions.

Installation

** Please note that these installation notes assume you have a clean installation of Laravel 5.2. Running the database migration will delete and recreate your users table if you already have one.
**

Edit composer.json

Edit your application's composer.json file to add this package to the require section as follows:

"require": {
	"kawsuj/knock": "dev-master"
}

Update Composer

cd to your application's root folder and update composer as follows:

composer update

Edit config/app.php

Edit your application's config/app.php file:

Add the following to the providers section:

yajra\Datatables\DatatablesServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
Knock\KnockServiceProvider::class,

Add the following to the aliases section:

'Form'      => Collective\Html\FormFacade::class,
'Html'      => Collective\Html\HtmlFacade::class,
'Datatables'=> yajra\Datatables\Datatables::class,
'Knock'	=>	Knock\Facades\Knock::class,

Edit config/auth.php

Edit your application's config/auth.php file:

Change the providers/users/model array as follows:

'model' => Knock\User::class,

Change the passwords/users/email array as follows:

'email' => 'knock::auth.emails.password',

Publish

cd to your application's root folder to publish assets, migrations, seeds, and middleware as follows:

php artisan vendor:publish --tag=knock

Edit app/Http/Kernel.php

Edit your application's app/Http/Kernel.php file and add the following to the $routeMiddleware array:

'knock' => \App\Http\Middleware\RedirectIfNotKnockUser::class,

Database Migration

cd to your application's root folder and run the database migration

php artisan migrate

Database Seeder

cd to your application's root folder and run the database seeder.

Note: You may need to run composer dump-autoload before running the seeder

composer dump-autoload
php artisan db:seed --class=KnockDatabaseSeeder

The installation is now complete!

Navigate to http://your-installation-url/knock

Sign in

For access to Users And Permissions and

username: developer@some-email-address.com

password: secret

For access to Users but NOT Permissions and

username: user-admin@some-email-address.com

password: secret

When signed in, you will be directed to the Knock home page where there are further user instructions.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固