PHPackages                             unstoppablecarl/gate-crasher - 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. unstoppablecarl/gate-crasher

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

unstoppablecarl/gate-crasher
============================

Safer Laravel superuser auth

0.0.5(7y ago)411MITPHPPHP &gt;=5.6.4

Since Jul 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/unstoppablecarl/gate-crasher)[ Packagist](https://packagist.org/packages/unstoppablecarl/gate-crasher)[ Docs](https://github.com/unstoppablecarl/gate-crasher)[ RSS](/packages/unstoppablecarl-gate-crasher/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (7)Versions (7)Used By (0)

Gate Crasher
============

[](#gate-crasher)

Safer Laravel superuser auth.

[![Source Code](https://camo.githubusercontent.com/babf0fe08e35843d824e2dec53c7b6dee5260bd7d7f6fa4cfc31d0a46f93736a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d756e73746f707061626c656361726c2f676174652d2d637261736865722d626c75652e737667)](https://github.com/unstoppablecarl/gate-crasher)[![Latest Version](https://camo.githubusercontent.com/5c1522b732e5be064d8c7e38d4a98f8b015e66fcbc9df27e00b7cee4e8c27222/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756e73746f707061626c656361726c2f676174652d637261736865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unstoppablecarl/gate-crasher)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/unstoppablecarl/gate-crasher/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/b287cc8904b4e87995228ca691514032a90d1f17e1a71240fa8f16a5b9e66b68/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f756e73746f707061626c656361726c2f676174652d637261736865722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/unstoppablecarl/gate-crasher)[![Coverage Status](https://camo.githubusercontent.com/9c1cf68c77b2d2f12ef6e94782fbb471f5ca9e5c916c90982b84c85f2878aa00/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f756e73746f707061626c656361726c2f676174652d637261736865722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/unstoppablecarl/gate-crasher?branch=master)[![Total Downloads](https://camo.githubusercontent.com/80744383d580733edda67cabb5d5aef12de420ad8509c4c10cc0cec552550c65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f756e73746f707061626c656361726c2f676174652d637261736865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unstoppablecarl/gate-crasher)

About
-----

[](#about)

Gate Crasher leverages the Laravel `Gate::before($beforeCallback)` api to authorize superuser abilities skipping the normal Gate ability/policy functionality. When `Gate::allows()` is called, If the `$beforeCallback` returns a non-null result that result will be considered the result of the check.

See

See `Illuminate\Auth\Access\Gate::before()` and `Illuminate\Contracts\Auth\Access\Gate::before()` in the Laravel framework.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.5.9
- Laravel &gt;= 5.2

Installation
------------

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/packages/unstoppablecarl/gate-crasher) and [Composer](http://getcomposer.org/). Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require unstoppablecarl/gate-crasher
```

Usage
-----

[](#usage)

A Gate Crasher instance should be registered within the `boot()` method of a service provider.

### Minimal gate crasher setup

[](#minimal-gate-crasher-setup)

```
