fr3on/laravel-ghost

Identify and eliminate dead routes, orphaned event listeners, and zombie jobs in your Laravel application.

Maintainers

Package info

github.com/fr3on/laravel-ghost

pkg:composer/fr3on/laravel-ghost

Statistics

Installs: 60

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.0.1 2026-04-12 13:42 UTC

This package is auto-updated.

Last update: 2026-04-12 13:44:25 UTC


README

GitHub license PHP Version Laravel Version Tests

Finds dead routes, orphaned event listeners, and zombie jobs — registered code that your application never actually uses.

Installation

composer require fr3on/laravel-ghost

Usage

Scan your application for unused code:

php artisan ghost:scan

Modes

  1. Log mode (default): Reads existing access logs (Nginx/Apache/Laravel).
  2. Telescope mode: Queries your Telescope entries for hit data.
  3. Counter mode: Lightweight DB hits table (opt-in).

To enable Counter mode, run:

php artisan ghost:install
php artisan migrate

Expected Result

The scan command produces a technical report of unused components:

+--------+------------------------+---------------------------------+
| Method | URI                    | Action                          |
+--------+------------------------+---------------------------------+
| GET    | /api/legacy/export     | LegacyController@export         |
| POST   | /internal/debug-reset  | DebugController@reset           |
+--------+------------------------+---------------------------------+

Found 2 dead routes, 0 orphaned listeners, 0 zombie jobs.

Configuration

Publish the config file:

php artisan vendor:publish --tag=ghost-config

Configure scan_paths, log_path, and exclude_patterns in config/ghost.php.