PHPackages                             eloquent-works/exile - 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. eloquent-works/exile

ActiveLibrary[Security](/categories/security)

eloquent-works/exile
====================

Comprehensive account, IP, network, device, strike, restriction, appeal, and moderation enforcement tools for Laravel applications.

v1.1.0(1mo ago)170MITPHPPHP ^8.2CI failing

Since Jul 13Pushed 1mo agoCompare

[ Source](https://github.com/EloquentWorks/Exile)[ Packagist](https://packagist.org/packages/eloquent-works/exile)[ RSS](/packages/eloquent-works-exile/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (30)Versions (3)Used By (0)

🛡️ Laravel Exile
================

[](#️-laravel-exile)

[![Tests](https://github.com/EloquentWorks/Exile/actions/workflows/tests.yml/badge.svg)](https://github.com/EloquentWorks/Exile/actions/workflows/tests.yml)[![Latest Release](https://camo.githubusercontent.com/cf877e31e1b1aa3f67de79cdc29e4aa185162f84c4b8b9dd39676ffa66328988/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f456c6f7175656e74576f726b732f4578696c65)](https://github.com/EloquentWorks/Exile/releases)[![License](https://camo.githubusercontent.com/fb1d88dda6ec19637e598a19382cc58213f3352074acfea76bf5c12b668d0c15/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f456c6f7175656e74576f726b732f4578696c65)](LICENSE)

A comprehensive moderation-enforcement package for Laravel.

Laravel Exile provides account, IP, CIDR network, and device bans; temporary and permanent restrictions; warnings and strike escalation; appeals; evidence management; audit history; middleware; queued notifications; customizable mail templates; and scheduled maintenance.

```
$user->ban(
    reason: 'Repeated harassment',
    expiresAt: now()->addDays(7),
    moderator: $moderator,
    category: 'harassment',
);

$user->strike(
    reason: 'Spam',
    points: 3,
);

$user->restrict(
    RestrictionType::Posting,
    reason: 'Posting cooldown',
);
```

✨ Highlights
------------

[](#-highlights)

- Account, exact-IP, CIDR network, device, and combined bans
- Configurable `any` or strict `all` matching for combined bans
- Temporary and permanent enforcement
- Transactional enforcement writes and after-commit side effects
- Login, posting, read-only, and shadow restrictions
- Warnings, strike points, and concurrency-safe escalation
- Appeals with approval, denial, withdrawal, and automatic revocation
- Evidence uploads with SHA-256 integrity checksums
- Moderator attribution, internal notes, metadata, and audit history
- Queued ban notifications with replaceable classes
- Publishable Markdown mail templates
- Middleware, expiration processing, and retention pruning
- Configurable models, table names, categories, and aliases

📋 Requirements
--------------

[](#-requirements)

LaravelPHPOrchestra Testbench12.x8.2+10.x13.x8.3+11.x📦 Installation
--------------

[](#-installation)

```
composer require eloquent-works/exile
php artisan exile:install --migrate
```

Publish the customizable notification templates as part of installation:

```
php artisan exile:install --migrate --views
```

Add `Bannable` to the account model:

```
