Looking to hire Laravel developers? Try LaraJobs

laravel-uhoh maintained by thecapybaralph

Description
Just a package to quickly check if your app is tampered with.
Last update
2026/02/27 08:50 (dev-main)
License
Downloads
52

Comments
comments powered by Disqus

Laravel Uh oh

Laravel Uhoh is a tiny integrity checker for your index.php. It monitors the file and fires events if anything changes.

This is a friendly guard, not a security guard dog. If someone can modify your application, they can modify Uhoh too. Use it as a warning tool, not a defense system.

Installation

You can install the package via composer:

composer require thecapybaralph/laravel-uhoh

You can publish the config file with:

php artisan vendor:publish --tag="laravel-uhoh-config"

Usage

$tripwire = \TheCapybaRalph\LaravelUhoh\Uhoh::run(); // returns true if check passes

You can also add this to your schedule

\Illuminate\Support\Facades\Schedule::command('uhoh:check')->hourly();

Creating a Listener

The package does not include built-in notifications by default. However, it fires two events that you can listen to in your application:

\TheCapybaRalph\LaravelUhoh\Events\IntegrityCheckFailed::class;
\TheCapybaRalph\LaravelUhoh\Events\IntegrityCheckPassed::class;

You can attach listeners to these events to perform any action you need when an integrity check passes or fails, such as sending notifications, logging, or triggering custom workflows.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.