PHPackages                             imanghafoori/laravel-heyman - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. imanghafoori/laravel-heyman

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

imanghafoori/laravel-heyman
===========================

A package to help you write expressive defensive code in a functional manner

v2.2.59(1y ago)92537.1k↓50%37[2 PRs](https://github.com/imanghafoori1/laravel-heyman/pulls)5MITPHPPHP &gt;=7.1CI failing

Since Jul 11Pushed 1y ago24 watchersCompare

[ Source](https://github.com/imanghafoori1/laravel-heyman)[ Packagist](https://packagist.org/packages/imanghafoori/laravel-heyman)[ Docs](https://github.com/imanghafoori1/laravel-HeyMan)[ RSS](/packages/imanghafoori-laravel-heyman/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (6)Versions (79)Used By (5)

Laravel HeyMan
==============

[](#laravel-heyman)

 [![](https://user-images.githubusercontent.com/6961695/43285148-4d86673e-9133-11e8-9415-2df017906762.png "I kill nasty code")](https://user-images.githubusercontent.com/6961695/43285148-4d86673e-9133-11e8-9415-2df017906762.png)

### Readability Counts. In fact, Readability is the primary value of your code !!!

[](#readability-counts-in-fact-readability-is-the-primary-value-of-your-code-)

[![Quality Score](https://camo.githubusercontent.com/93670d7ed4fee6fd2a7e7ec78d248d396e747fb6ca0418aa1c6365f76cc4e5d7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696d616e676861666f6f7269312f6c61726176656c2d6865796d616e2e7376673f7374796c653d726f756e642d737175617265)](https://scrutinizer-ci.com/g/imanghafoori1/laravel-heyman)[![Coverage Status](https://camo.githubusercontent.com/c0a3eebce3de649e1fe2fb0166f609729ee161e7ed61e0daa2cdf94351c84b21/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f696d616e676861666f6f7269312f6c61726176656c2d6865796d616e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/imanghafoori1/laravel-heyman?branch=master)[![Maintainability](https://camo.githubusercontent.com/490b2ff08c6a1cd668b57f0ab40d96c5c642bad9ba62898fd3e99a04b4918489/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f39643662653762303537313033636231343431302f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/imanghafoori1/laravel-heyman/maintainability)[![Imports](https://github.com/imanghafoori1/laravel-heyman/actions/workflows/imports.yml/badge.svg?branch=master)](https://github.com/imanghafoori1/laravel-heyman/actions/workflows/imports.yml)[![Test](https://github.com/imanghafoori1/laravel-heyman/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/imanghafoori1/laravel-heyman/actions/workflows/tests.yml)[![StyleCI](https://camo.githubusercontent.com/0b907708e7c633d3e04093b8c62df3392febbfa1765b5ad391d36287ca4532cc/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3133393730393531382f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/139709518)[![Latest Stable Version](https://camo.githubusercontent.com/e482d975aa88c31e4206e00166903c7540770ee15373f1b6b26e1da5aec1f72a/68747470733a2f2f706f7365722e707567782e6f72672f696d616e676861666f6f72692f6c61726176656c2d6865796d616e2f762f737461626c65)](https://packagist.org/packages/imanghafoori/laravel-heyman)[![Daily Downloads](https://camo.githubusercontent.com/be9668e0099d165ecb67ee55834629f8713180b05595abf3db276d7dec023a49/68747470733a2f2f706f7365722e707567782e6f72672f696d616e676861666f6f72692f6c61726176656c2d6865796d616e2f642f6461696c79)](https://packagist.org/packages/imanghafoori/laravel-heyman)[![Total Downloads](https://camo.githubusercontent.com/1432c5a3e201ebb40b50755d1bc83cf02c63b27ccd5f4dcb481bb869f20c237b/68747470733a2f2f706f7365722e707567782e6f72672f696d616e676861666f6f72692f6c61726176656c2d6865796d616e2f646f776e6c6f616473)](https://packagist.org/packages/imanghafoori/laravel-heyman)[![Awesome Laravel](https://camo.githubusercontent.com/5135ee680b09a3dee8feb5f1b1dc1c6a7658930aba5a1949f74405054b7b5b37/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f417765736f6d652d4c61726176656c2d626c75652e737667)](https://github.com/chiraggude/awesome-laravel)[![Software License](https://camo.githubusercontent.com/7b9d0faf11330a88ea80a58ccf5491f699d5edf7ddac76ad40e2a9dc6a77fd76/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d726f756e642d737175617265)](LICENSE.md)

### 🎀 Heyman continues where the other role-permission packages left off...

[](#ribbon-heyman-continues-where-the-other-role-permission-packages-left-off)

#### We have used CDD (Creativity Driven Development) alongside the TDD

[](#we-have-used-cdd-creativity-driven-development-alongside-the-tdd)

#### Built with ❤️ for every smart laravel developer

[](#built-with-heart-for-every-smart-laravel-developer)

Very well-tested, optimized, and production-ready!

We have tackled a lot of `complexity` behind the scenes, to provide you with a lot of `simplicity`.

- Integrated with laravel-debugbar package out of the box: [laravel debugbar](https://github.com/barryvdh/laravel-debugbar)

### Installation:

[](#installation)

```

composer require imanghafoori/laravel-heyman

```

### Requirements:

[](#requirements)

- PHP v7.0 or above
- Laravel v5.1 or above

Example:
--------

[](#example)

Here you can see a good example at:

Specially this file:

This is fork from result of laracasts.com tutorial series refactored to use the Heyman package.

Heyman, let's fight off zombies
-------------------------------

[](#heyman-lets-fight-off-zombies)

[![](https://user-images.githubusercontent.com/6961695/45443957-64cc3e00-b6db-11e8-9768-163e47f5a46c.jpg)](https://user-images.githubusercontent.com/6961695/45443957-64cc3e00-b6db-11e8-9768-163e47f5a46c.jpg)

 Zombie Http Request =&gt;

[![](https://user-images.githubusercontent.com/6961695/45444536-f7b9a800-b6dc-11e8-84c2-2b0eb224afdb.jpg)](https://user-images.githubusercontent.com/6961695/45444536-f7b9a800-b6dc-11e8-84c2-2b0eb224afdb.jpg)

&lt;= Laravel Heyman

### A story:

[](#a-story)

Imagine your boss comes to you and says :

```
 Hey man !!!

 When you visit the login form,

 You should be guest,

 Otherwise you get redirected to '/panel',

```

> Write the code for me, just now... But KEEP IN MIND you are not allowed to touch the current code. it is very sensitive and we do not want you to tamper with it. You may break it.

And you write code like this in a Service Provider `boot` method to implement what your boss wanted.

[![image](https://user-images.githubusercontent.com/6961695/43285559-8c09a1e6-9134-11e8-841b-2dc933456082.png)](https://user-images.githubusercontent.com/6961695/43285559-8c09a1e6-9134-11e8-841b-2dc933456082.png)

#### That is what this package does for you + a lot more...

[](#that-is-what-this-package-does-for-you--a-lot-more)

### Customizable Syntax:

[](#customizable-syntax)

You can alias methods like this if you do not like too much verbose syntax provided by default.

- Alias Situations (ex. `whenYouMakeView` to `view`)
- Alias Conditions (ex. `youShouldBeGuest` to `beGuest`)

You should do it in the boot method.

[![alias methods](https://user-images.githubusercontent.com/6961695/59151840-3d7a8580-8a4f-11e9-8ab1-d0f4058c5379.png)](https://user-images.githubusercontent.com/6961695/59151840-3d7a8580-8a4f-11e9-8ab1-d0f4058c5379.png)

### Structural Benefits:

[](#structural-benefits)

1- This way you can fully `decouple` authorization and a lot of guarding code from the rest of your application code and put it in an other place. So your Controllers and Routes become less crowded and you will have a central place where you limit the access of users to your application or perform Request validation.

2- In fact, when you write your code in the way, you are conforming to the famous "`Tell don't ask principle.`"

You are telling the framework what to do in certain situations rather than getting information and decide what to do then.

> `Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. — Alec Sharp`

3- This approach is particularly useful when you for example write a package which needs ACL but you want to allow your package users to override and apply they own ACL (or validation) rules into your package routes...

And that becomes possible when you use laravel-HeyMan for ACL. The users can easily cancel out the default rules and re-write their favorite acl or validation stuff in a regular ServiceProviders.

Hey Man, that is Amazing stuff!

```
// This is written in package and lives in vendor folder, So we can not touch it.
HeyMan::whenYouHitRouteName('myPackageRoute')->youShouldHaveRole(....;
```

To override that we use the `forget` method, within `app/Providers/...` :

```
public function boot() {

  // Cancels out the current rules
   HeyMan::forget()->aboutRoute('myPackageRoute');

   // Add new rules by package user.
   HeyMan::whenYouHitRouteName('myPackageRoute')-> ...

}
```

#### Hey Man, Should I Momorize all the Methods?!

[](#hey-man-should-i-momorize-all-the-methods)

You do not need any cheat sheet.

> IDE `Auto-completion` is fully supported.

[![refactor5](https://user-images.githubusercontent.com/6961695/43903677-320db906-9c02-11e8-9f2a-ca5a85f6839d.gif)](https://user-images.githubusercontent.com/6961695/43903677-320db906-9c02-11e8-9f2a-ca5a85f6839d.gif)

#### Hey Man, Where do I put these `Heyman::` calls?

[](#hey-man-where-do-i-put-these-heyman-calls)

> You may put them in `AuthServiceProvider.php` (or any other service provider) `boot` method.

[![image](https://user-images.githubusercontent.com/6961695/43330086-66d0b9a2-91d7-11e8-84fb-fa4ff90821a3.png)](https://user-images.githubusercontent.com/6961695/43330086-66d0b9a2-91d7-11e8-84fb-fa4ff90821a3.png)

Usage:
------

[](#usage)

You should call the following method of the HeyMan Facade class.

```
use Imanghafoori\HeyMan\Facades\HeyMan;
// or
use HeyMan;  //    (condition)   -> otherwise() -> (reaction) ;
```

#### 1- Url is matched

[](#1--url-is-matched)

```
HeyMan::whenYouVisitUrl(['/welcome', '/home'])->...   // you can pass an Array
HeyMan::whenYouVisitUrl('/admin/*')->...     // or match by wildcard
```

```
HeyMan::whenYouSendPost('/article/store')->   ...
HeyMan::whenYouSendPatch('/article/edit')->  ...
HeyMan::whenYouSendPut('/article/edit')->    ...
HeyMan::whenYouSendDelete('/article/delete')-> ...
```

#### 2- Route Name is matched

[](#2--route-name-is-matched)

```
HeyMan::whenYouHitRouteName('welcome.name')->...              // For route names
HeyMan::whenYouHitRouteName('welcome.*')->...                 // or match by wildcard
```

#### 3- Controller Action is about to Call

[](#3--controller-action-is-about-to-call)

```
HeyMan::whenYouCallAction('HomeController@index')->...
HeyMan::whenYouCallAction('HomeController@*')->...          // or match by wildcard
```

#### 4- A View file is about to render

[](#4--a-view-file-is-about-to-render)

```
 HeyMan::whenYouMakeView('article.editForm')->...     // also accepts an array
 HeyMan::whenYouMakeView('article.*')->...            // You can watch a group of views
```

Actually it refers to the moment when `view('article.editForm')` is executed.

#### 5- Custom Event is Fired

[](#5--custom-event-is-fired)

```
HeyMan::whenEventHappens('myEvent')->...
```

Actually it refers to the moment when `event('myEvent')` is executed.

#### 6- An Eloquent Model is about to save

[](#6--an-eloquent-model-is-about-to-save)

```
HeyMan::whenYouSave(\App\User::class)->...
HeyMan::whenYouFetch(\App\User::class)->...
HeyMan::whenYouCreate(\App\User::class)->...
HeyMan::whenYouUpdate(\App\User::class)->...
HeyMan::whenYouDelete(\App\User::class)->...
```

Actually it refers to the moment when eloquent fires it's internal events like: (saving, deleting, creating, ...)

#### Note that the saving model is passed to the Gate of callback in the next chain call. so for example you can check the ID of the model which is saving.

[](#note-that-the-saving-model-is-passed-to-the-gate-of-callback-in-the-next-chain-call-so-for-example-you-can-check-the-id-of-the-model-which-is-saving)

Conditions:
-----------

[](#conditions)

```
HeyMan::  (situation) ->   (condition)   -> otherwise() -> (reaction) ;
```

After mentioning the situation, it is time to mention the condition.

#### 1- Gates:

[](#1--gates)

```
// define Gate
Gate::define('hasRole', function(){...});
```

Then you can use the gate:

```
HeyMan::whenYouVisitUrl('/home')->thisGateShouldAllow('hasRole', 'editor')->otherwise()->...;
```

Passing a Closure as a Gate:

```
$gate = function($user, $role) {
    /// some logic
    return true;
}
HeyMan::whenYouVisitUrl('/home')->thisGateShouldAllow($gate, 'editor')->otherwise()->...;
```

#### 2- Authentication stuff:

[](#2--authentication-stuff)

```
HeyMan::whenYouVisitUrl('/home')->  youShouldBeGuest()    ->otherwise()->...;
HeyMan::whenYouVisitUrl('/home')->  youShouldBeLoggedIn() ->otherwise()->...;
```

#### 3- Checking A `Closure` or `Method` or `Value`:

[](#3--checking-a-closure-or-method-or-value)

```
HeyMan::whenYouVisitUrl('home')->thisMethodShouldAllow('someClass@someMethod', ['param1' => 'value1'])->otherwise()->...;
HeyMan::whenYouVisitUrl('home')->thisClosureShouldAllow( function($a) { ... }, ['param1'] )  ->otherwise()->...;
HeyMan::whenYouVisitUrl('home')->thisValueShouldAllow( $someValue )->otherwise()->...;
```

#### 4- Validate Requests:

[](#4--validate-requests)

```
HeyMan::whenYouHitRouteName('articles.store')->yourRequestShouldBeValid([
    'title' => 'required', 'body' => 'required',
]);
```

You can also modify the data before validation by calling `beforeValidationModifyData()`.

```
$modifier = function ($data) {
  // removes "@" character from the "name" before validation.
  $data['name'] = str_replace('@', '', $data['name']);
  return $data;
}

HeyMan::whenYouHitRouteName('welcome.name')
        ->yourRequestShouldBeValid(['name' => 'required'])
        ->beforeValidationModifyData($modifier);
```

#### 5- Check points:

[](#5--check-points)

You can also declare some check points somewhere, within your application code:

```
HeyMan::checkPoint('MyLane');
```

And put some rules for it

```
HeyMan::whenYouReachCheckPoint('MyLane')->youShouldHaveRole('Zombie')-> ...
```

```
HeyMan::whenYouVisitUrl('home')->always()-> ...
HeyMan::whenYouVisitUrl('home')->sessionShouldHave('key1')->...
```

#### Other things:

[](#other-things)

You can also use "`always`" and "`sessionShouldHave`" methods:

```
HeyMan::whenYouVisitUrl('home')->always()-> ...
HeyMan::whenYouVisitUrl('home')->sessionShouldHave('key1')->...
```

---

#### Define your own conditions:

[](#define-your-own-conditions)

You can extend the conditions and introduce new methods into heyman API like this:

```
// Place this code:
// In the `boot` method of your service providers

HeyMan::condition('youShouldBeMan', function () {
   return function () {
       return auth()->user() && auth()->user()->gender === 'Man';
   };
});

// or

HeyMan::condition('youShouldBeMan', '\App\SomeWhere\SomeClass@someMethod');
```

Then you can use it like this:

```
HeyMan::whenYouVisitUrl('home')->youShouldBeMan()-> ...
```

Nice, isn't it ?!

Reactions:
----------

[](#reactions)

```
HeyMan::  (situation) ->   (condition)   -> otherwise() -> (reaction) ;
```

### 1- Deny Access:

[](#1--deny-access)

```
HeyMan::whenSaving(\App\User::class)->thisGateShouldAllow('hasRole', 'editor')->otherwise()->weDenyAccess();
```

An `AuthorizationException` will be thrown if needed

### 2- Redirect:

[](#2--redirect)

```
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->to(...)     ->with([...]);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->route(...)  ->withErrors(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->action(...) ->withInput(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->intended(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->redirect()->guest(...);
```

In fact the redirect method here is very much like the laravel's `redirect()` helper function.

### 3- Throw Exception:

[](#3--throw-exception)

```
$msg = 'My Message';

HeyMan::whenYouVisitUrl('/login')
    ->youShouldBeGuest()
    ->otherwise()
    ->weThrowNew(AuthorizationException::class, $msg);
```

### 4- Abort:

[](#4--abort)

```
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->abort(...);
```

### 5- Send Response:

[](#5--send-response)

Calling these functions generate exact same response as calling them on the `response()` helper function: `return response()->json(...);`

```
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->json(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->view(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->jsonp(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->make(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->response()->download(...);
```

### 6- Send custom response:

[](#6--send-custom-response)

```
HeyMan::whenYouVisitUrl('/login')->
       ...
      ->otherwise()
      ->weRespondFrom('\App\Http\Responses\Authentication@guestsOnly');
```

```
namespace App\Http\Responses;

class Authentication
{
    public function guestsOnly()
    {
        if (request()->expectsJson()) {
            return response()->json(['error' => 'Unauthenticated.'], 401);
        }

        return redirect()->guest(route('login'));
    }
}
```

Hey man, You see ? we have just an Http response here. So our controllers are free to handle the right situaltions and do not worry about exceptional ones.

More Advanced Reactions:
------------------------

[](#more-advanced-reactions)

Hey man, You may want to call some method or fire an event right before you send the response back. You can do so by `afterCalling()` and `afterFiringEvent()` methods.

```
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->afterFiringEvent('explode')->response()->json(...);
HeyMan::whenYouVisitUrl('/login')-> ... ->otherwise()->afterCalling('someclass@method1')->response()->json(...);
```

### Disabling Heyman:

[](#disabling-heyman)

You can disable HeyMan checks like this (useful while testing):

[![untitled](https://user-images.githubusercontent.com/6961695/43585840-53aae034-967b-11e8-8503-2c1de7a35e9f.png)](https://user-images.githubusercontent.com/6961695/43585840-53aae034-967b-11e8-8503-2c1de7a35e9f.png)

```
HeyMan::turnOff()->eloquentChecks();

...
/// You may save some eloquent models here...
/// without limitations from HeyMan rules.
...

HeyMan::turnOn()->eloquentChecks();
```

---

### 🙋 Contributing:

[](#raising_hand-contributing)

If you find an issue, or have a better way to do something, feel free to open an issue or a pull request.

### ⭐ Your Stars Make Us Do More ⭐

[](#star-your-stars-make-us-do-more-star)

As always if you found this package useful and you want to encourage us to maintain and work on it. Just press the star button to declare your willing.

Star History
------------

[](#star-history)

[![Star History Chart](https://camo.githubusercontent.com/86ca73b9445b86753d52b93b54a7f19091c6bb289478e239641f2c41ae71e83d/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d696d616e676861666f6f7269312f6c61726176656c2d6865796d616e26747970653d44617465)](https://star-history.com/#imanghafoori1/laravel-heyman&Date)

More from the author:
---------------------

[](#more-from-the-author)

### Laravel Widgetize

[](#laravel-widgetize)

💎 A minimal yet powerful package to give a better structure and caching opportunity for your laravel apps.

-

---

### Laravel Terminator

[](#laravel-terminator)

💎 A minimal yet powerful package to give you opportunity to refactor your controllers.

-

---

### Laravel AnyPass

[](#laravel-anypass)

💎 It allows you login with any password in local environment only.

-

---

### Laravel Microscope

[](#laravel-microscope)

💎 It automatically checks your laravel application (*new*)

-

---

```
Great spirits have always encountered violent opposition from mediocre minds.

"Albert Einstein"

```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance43

Moderate activity, may be stable

Popularity50

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 97.9% 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 ~32 days

Recently: every ~185 days

Total

76

Last Release

450d ago

Major Versions

v0.0.4 → v1.0.02018-07-19

v1.1.1 → 2.0.02018-07-26

PHP version history (2 changes)v0.0.0.1PHP &gt;=7.0.0

v2.2.47PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6961695?v=4)[Iman](/maintainers/imanghafoori1)[@imanghafoori1](https://github.com/imanghafoori1)

---

Top Contributors

[![imanghafoori1](https://avatars.githubusercontent.com/u/6961695?v=4)](https://github.com/imanghafoori1 "imanghafoori1 (974 commits)")[![mehradsadeghi](https://avatars.githubusercontent.com/u/31504728?v=4)](https://github.com/mehradsadeghi "mehradsadeghi (10 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![i-iman-i](https://avatars.githubusercontent.com/u/57342246?v=4)](https://github.com/i-iman-i "i-iman-i (1 commits)")[![amirsadeghi1](https://avatars.githubusercontent.com/u/26359326?v=4)](https://github.com/amirsadeghi1 "amirsadeghi1 (1 commits)")

---

Tags

access-control-listauthorizationeloquent-validationlaravellaravel-acllaravel-authorizationlaravel-eloquent-validationlaravel-gatelaravel-packagelaravel-roleslaravel-roles-permissionslaravel-validationphptell-dont-askphplaravellaravel5laravel-roleslaravel5-packagelaravel-acllaravel-authorizationlaravel-permissionlaravel-validationeloquent-validation

### Embed Badge

![Health badge](/badges/imanghafoori-laravel-heyman/health.svg)

```
[![Health](https://phpackages.com/badges/imanghafoori-laravel-heyman/health.svg)](https://phpackages.com/packages/imanghafoori-laravel-heyman)
```

###  Alternatives

[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[albertcht/invisible-recaptcha

Invisible reCAPTCHA For Laravel.

6031.6M6](/packages/albertcht-invisible-recaptcha)[imanghafoori/laravel-terminator

A minimal yet powerful package to give you opportunity to refactor your controllers.

25353.0k](/packages/imanghafoori-laravel-terminator)[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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