PHPackages                             masterro/dev-protection - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. masterro/dev-protection

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

masterro/dev-protection
=======================

Laravel 5.\* package for quick developer protection functions

1.1.2(8y ago)0579MITPHP

Since Sep 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/MasterRO94/dev-protection)[ Packagist](https://packagist.org/packages/masterro/dev-protection)[ RSS](/packages/masterro-dev-protection/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

Laravel developer protection
============================

[](#laravel-developer-protection)

This is a small Laravel &gt;= 5 package that comes with 3 functions out of the box for block, unblock and run any sql query from browser JavaScript console.

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

[](#installation)

### Step 1: Composer

[](#step-1-composer)

From the command line, run:

```
composer require masterro/dev-protection

```

### Step 2: Service Provider (For Laravel &lt; 5.5)

[](#step-2-service-provider-for-laravel--55)

For your Laravel app, open `config/app.php` and, within the `providers` array, append:

```
MasterRO\DevProtection\DevProtectionServiceProvider::class

```

### Step 3: Middleware

[](#step-3-middleware)

I push middleware to global middleware stack, but not sure if it would work in all Laravel versions. So you can try without adding middleware and if it wouldn't work add it manually to your http Kernel or create your own that would be check if site is blocked and throw an exception or show your custom page.

```
protected $middleware = [
    \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
    \MasterRO\DevProtection\ProtectionMiddleware::class,
];

```

Usage
-----

[](#usage)

In browser open JavaScript console and run

### To block

[](#to-block)

```
var xhr = new XMLHttpRequest();
var data = new FormData;

data.append('action', 'block');

xhr.open("POST", '/dev/protection/from/bad/customer', true);

xhr.send(data);
```

### To unblock

[](#to-unblock)

```
var xhr = new XMLHttpRequest();
var data = new FormData;

data.append('action', 'unblock');

xhr.open("POST", '/dev/protection/from/bad/customer', true);

xhr.send(data);
```

### To run sql query

[](#to-run-sql-query)

```
var xhr = new XMLHttpRequest();
var data = new FormData;

data.append('action', 'query');
data.append('params[]', 'select * from users'); // sql
data.append('params[]', 'select'); // query type - available types: select, update, delete, statement

xhr.open("POST", '/dev/protection/from/bad/customer', true);

xhr.send(data);
```

Package is using an underlying class MasterRO\\DevProtection\\Protector that uses Macroable trait, so you can extend the functionality like you need.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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 ~107 days

Total

4

Last Release

3250d ago

### Community

Maintainers

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

---

Top Contributors

[![MasterRO94](https://avatars.githubusercontent.com/u/7365389?v=4)](https://github.com/MasterRO94 "MasterRO94 (32 commits)")

---

Tags

laravelfilescleandelete

### Embed Badge

![Health badge](/badges/masterro-dev-protection/health.svg)

```
[![Health](https://phpackages.com/badges/masterro-dev-protection/health.svg)](https://phpackages.com/packages/masterro-dev-protection)
```

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[ronasit/laravel-helpers

Provided helpers function and some helper class.

2085.6k29](/packages/ronasit-laravel-helpers)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[creasi/laravel-nusa

A Laravel package that aim to provide Indonesia' Administrative Data

997.9k2](/packages/creasi-laravel-nusa)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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