PHPackages                             kawsuj/knock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. kawsuj/knock

ActiveLibrary[Security](/categories/security)

kawsuj/knock
============

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

0.1.10(8y ago)093[2 issues](https://github.com/kawsuj/knock/issues)MITHTML

Since May 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kawsuj/knock)[ Packagist](https://packagist.org/packages/kawsuj/knock)[ RSS](/packages/kawsuj-knock/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (12)Used By (0)

Knock: Roles and Permissions
============================

[](#knock-roles-and-permissions)

Description
-----------

[](#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
------------

[](#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-composerjson)

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

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

```

### Update Composer

[](#update-composer)

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

```
composer update

```

### Edit config/app.php

[](#edit-configappphp)

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-configauthphp)

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

[](#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-apphttpkernelphp)

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

[](#database-migration)

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

```
php artisan migrate

```

### Database Seeder

[](#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 ****

### Sign in

[](#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.

###  Health Score

27

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~3 days

Total

11

Last Release

3185d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecd4d7483377283927ecb6f53c63b3f3b985270abee4d2699e84aa03cd2a691e?d=identicon)[kawsuj](/maintainers/kawsuj)

---

Top Contributors

[![kawsuj](https://avatars.githubusercontent.com/u/12618606?v=4)](https://github.com/kawsuj "kawsuj (24 commits)")

---

Tags

laravelsecurityuserpermissiontagrole

### Embed Badge

![Health badge](/badges/kawsuj-knock/health.svg)

```
[![Health](https://phpackages.com/badges/kawsuj-knock/health.svg)](https://phpackages.com/packages/kawsuj-knock)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
