PHPackages                             neondigital/laravel-view-defender - 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. neondigital/laravel-view-defender

ActiveLibrary[Security](/categories/security)

neondigital/laravel-view-defender
=================================

Protect your Laravel Views from the dark side!

119PHP

Since Apr 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/neondigital/view-defender)[ Packagist](https://packagist.org/packages/neondigital/laravel-view-defender)[ RSS](/packages/neondigital-laravel-view-defender/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

\*\* In Development \*\*

Laravel View Defender
=====================

[](#laravel-view-defender)

[![](https://cloud.githubusercontent.com/assets/647407/18585846/4e74f0a4-7c11-11e6-88fc-a5989e0f740b.jpg)](https://cloud.githubusercontent.com/assets/647407/18585846/4e74f0a4-7c11-11e6-88fc-a5989e0f740b.jpg)

*Defending Laravel Views from evil*

The story so far...
-------------------

[](#the-story-so-far)

Views are great, they make outputting HTML etc nice 'n' easy. However, some developers from the dark side have been passing magical objects to their views, causing chaos in the view galaxy.

Designers (and even developers showing signs of the dark side) have been known to use these objects for evil, creating hundreds of database queries through lazy-loading relationships, and sometimes even more sinister!

NEON brings you **View Defender** to the rescue. Simply adding the package to your Laravel application will defend your views against evil objects such as Eloquent Models and Doctrine Entities.

Use the Force
-------------

[](#use-the-force)

Require this package

```
composer require neondigital/laravel-view-defender
```

After adding the package, add the ServiceProvider (Force) to the providers array in `config/app.php`

```
Neondigital\LaravelViewDefender\ViewDefenderServiceProvider::class,
```

To publish the config use:

```
php artisan vendor:publish --tag="config"
```

License
-------

[](#license)

This package is licensed under the [MIT license](https://github.com/neondigital/view-defender/blob/master/LICENSE).

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6089840?v=4)[Neon Digital](/maintainers/neondigital)[@neondigital](https://github.com/neondigital)

---

Top Contributors

[![glennjacobs](https://avatars.githubusercontent.com/u/647407?v=4)](https://github.com/glennjacobs "glennjacobs (7 commits)")

### Embed Badge

![Health badge](/badges/neondigital-laravel-view-defender/health.svg)

```
[![Health](https://phpackages.com/badges/neondigital-laravel-view-defender/health.svg)](https://phpackages.com/packages/neondigital-laravel-view-defender)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.0M138](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25772.0k36](/packages/paragonie-ecc)

PHPackages © 2026

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