PHPackages                             grazulex/laravel-devtoolbox - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. grazulex/laravel-devtoolbox

ActiveLibrary[Testing &amp; Quality](/categories/testing)

grazulex/laravel-devtoolbox
===========================

Swiss-army artisan CLI for Laravel — Scan, inspect, debug, and explore every aspect of your Laravel application from the command line.

v1.5.0(8mo ago)1535.4k↑25%5[1 PRs](https://github.com/Grazulex/laravel-devtoolbox/pulls)MITPHPPHP ^8.3CI passing

Since Jul 26Pushed 6mo ago3 watchersCompare

[ Source](https://github.com/Grazulex/laravel-devtoolbox)[ Packagist](https://packagist.org/packages/grazulex/laravel-devtoolbox)[ Docs](https://github.com/grazulex/laravel-devtoolbox)[ Fund](https://www.buymeacoffee.com/Grazulex)[ Fund](https://paypal.me/strauven)[ RSS](/packages/grazulex-laravel-devtoolbox/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (9)Versions (7)Used By (0)

Laravel Devtoolbox
==================

[](#laravel-devtoolbox)

[![Laravel Devtoolbox](new_logo.png)](new_logo.png)

Swiss-army artisan CLI for Laravel — Scan, inspect, debug, and explore every aspect of your Laravel application from the command line.

[![Latest Version](https://camo.githubusercontent.com/e74048ca792fdd2c5d3835fc6677f7167536af895e0ff7eed397fb8d58215481/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772617a756c65782f6c61726176656c2d646576746f6f6c626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grazulex/laravel-devtoolbox)[![Total Downloads](https://camo.githubusercontent.com/36857a5a56df03b13b5e2cbf8087b3d1b41ba3f36a1e7a89c487aec773f69329/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772617a756c65782f6c61726176656c2d646576746f6f6c626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grazulex/laravel-devtoolbox)[![License](https://camo.githubusercontent.com/4de48eb349a4654f26baa0bdd8df4ca7dd61e331ff1b4d229bbb50a6cb213d1c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6772617a756c65782f6c61726176656c2d646576746f6f6c626f782e7376673f7374796c653d666c61742d737175617265)](https://github.com/Grazulex/laravel-devtoolbox/blob/main/LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/65d6649c8329d23e709950ae4b1511468bb1f2d4143f9d07ed04b3f88b242e22/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e332532422d3737376262343f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://php.net/)[![Laravel Version](https://camo.githubusercontent.com/50a156743f40e3d269e0d6c04cd9c402cac1a50f075556139533a2ccad5ffdfb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312e7825323025374325323031322e782d6666326432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://laravel.com/)[![Tests](https://camo.githubusercontent.com/6a211aa1ba5fcacd3a9a46568916011977b77f6a9a60bb5f136fe556de9fbf0b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6772617a756c65782f6c61726176656c2d646576746f6f6c626f782f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/Grazulex/laravel-devtoolbox/actions)[![Code Style](https://camo.githubusercontent.com/161d70e6871f808e0439b3e7a86540993ae98775540b5a2e78226000e3c419c7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d70696e742d3030303030303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://github.com/laravel/pint)

✨ Features
----------

[](#-features)

Laravel Devtoolbox provides comprehensive analysis tools for Laravel applications:

- **🔎 Deep Application Scanning** - Complete analysis of models, routes, services, and more
- **🧠 Model Introspection** - Analyze Eloquent models, relationships, and usage patterns
- **🛣️ Route Analysis** - Inspect routes, detect unused ones, and analyze middleware
- **📦 Service Container Analysis** - Examine bindings, singletons, and providers
- **⚙️ Environment Auditing** - Compare configuration files and detect inconsistencies
- **🔄 SQL Query Tracing** - Monitor and analyze database queries for specific routes
- **📊 Multiple Export Formats** - JSON, Markdown, Mermaid diagrams, and more
- **🛠 Developer Experience** - Rich console output with actionable insights

📦 Installation
--------------

[](#-installation)

Install via Composer as a development dependency:

```
composer require --dev grazulex/laravel-devtoolbox
```

**Requirements:**

- PHP 8.3+
- Laravel 11.0+ | 12.0+

🚀 Quick Start
-------------

[](#-quick-start)

```
# See all available commands
php artisan list dev:

# Enhanced application overview (new!)
php artisan dev:about+ --extended --performance

# Quick health check of your application
php artisan dev:scan --all

# Find where a model is used
php artisan dev:model:where-used App\Models\User

# Detect unused routes
php artisan dev:routes:unused

# Find routes by controller (reverse lookup - new!)
php artisan dev:routes:where UserController

# Generate model relationship diagram
php artisan dev:model:graph --format=mermaid --output=models.mmd

# Trace SQL queries for a route
php artisan dev:sql:trace --route=dashboard

# Analyze SQL queries for N+1 problems (new!)
php artisan dev:sql:duplicates --route=users.index --threshold=3

# Monitor logs in real-time (new!)
php artisan dev:log:tail --follow --level=error

# Compare environment files
php artisan dev:env:diff --against=.env.example

# Analyze database column usage
php artisan dev:db:column-usage --unused-only

# Security scan for unprotected routes
php artisan dev:security:unprotected-routes --critical-only

# Analyze container bindings (new!)
php artisan dev:container:bindings --show-resolved

# Service provider performance analysis (new!)
php artisan dev:providers:timeline --slow-threshold=100

# Performance monitoring (new!)
php artisan dev:performance:memory --route=dashboard
php artisan dev:performance:slow-queries --threshold=1000
php artisan dev:cache:analysis --drivers=redis,file
php artisan dev:queue:analysis --failed-jobs --slow-jobs
```

🔍 Available Commands
--------------------

[](#-available-commands)

### General Scanning &amp; Analysis

[](#general-scanning--analysis)

- `dev:scan` - Comprehensive application analysis with multiple scanner types
- `dev:about+` - Enhanced version of Laravel's about command with extended information

### Model Analysis

[](#model-analysis)

- `dev:models` - List and analyze all Eloquent models
- `dev:model:where-used` - Find where specific models are used
- `dev:model:graph` - Generate model relationship diagrams

### Route Analysis

[](#route-analysis)

- `dev:routes` - Inspect application routes
- `dev:routes:unused` - Detect potentially unused routes
- `dev:routes:where` - Find routes by controller/method (reverse lookup)

### Database Analysis

[](#database-analysis)

- `dev:db:column-usage` - Analyze database column usage across the Laravel application codebase
- `dev:sql:trace` - Trace SQL queries for specific routes
- `dev:sql:duplicates` - Analyze SQL queries for N+1 problems, duplicates, and performance issues

### Security Analysis

[](#security-analysis)

- `dev:security:unprotected-routes` - Scan for routes that are not protected by authentication middleware

### Service &amp; Container Analysis

[](#service--container-analysis)

- `dev:services` - Examine service container bindings
- `dev:container:bindings` - Analyze container bindings, singletons, and dependency injection mappings
- `dev:providers:timeline` - Analyze service provider boot timeline and performance
- `dev:commands` - List and analyze artisan commands

### Middleware Analysis

[](#middleware-analysis)

- `dev:middleware` - Analyze middleware classes and usage
- `dev:middlewares:where-used` - Find where specific middleware is used

### View Analysis

[](#view-analysis)

- `dev:views` - Scan Blade templates and views

### Environment &amp; Logging

[](#environment--logging)

- `dev:env:diff` - Compare environment configuration files
- `dev:log:tail` - Monitor Laravel logs with real-time filtering and pattern matching

### Performance Analysis (new!)

[](#performance-analysis-new)

- `dev:performance:memory` - Analyze memory usage patterns and performance
- `dev:performance:slow-queries` - Detect and analyze slow database queries
- `dev:cache:analysis` - Analyze cache performance and configuration
- `dev:queue:analysis` - Analyze queue performance, failed jobs, and job patterns

📊 Export Formats
----------------

[](#-export-formats)

All commands support multiple output formats:

FormatUsageBest For**Array/Table**`--format=array` (default)Interactive development**JSON**`--format=json`Automation, CI/CD**Count**`--format=count`Quick metrics**Mermaid**`--format=mermaid`Documentation, diagrams### Save to Files

[](#save-to-files)

```
# Export to JSON
php artisan dev:models --format=json --output=models.json

# Generate Mermaid diagram
php artisan dev:model:graph --format=mermaid --output=relationships.mmd

# Save comprehensive scan
php artisan dev:scan --all --format=json --output=app-analysis.json
```

🛠 Configuration
---------------

[](#-configuration)

Publish the configuration file to customize behavior:

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

This creates `config/devtoolbox.php` where you can customize:

- Default output formats
- Scanner-specific options
- Performance settings
- Export configurations

📚 Documentation
---------------

[](#-documentation)

Comprehensive documentation and examples are available in our **[GitHub Wiki](https://github.com/Grazulex/laravel-devtoolbox/wiki)**:

- **[Getting Started](https://github.com/Grazulex/laravel-devtoolbox/wiki/Getting-Started)** - Quick start guide
- **[Commands Reference](https://github.com/Grazulex/laravel-devtoolbox/wiki/Commands)** - Detailed command documentation
- **[Configuration](https://github.com/Grazulex/laravel-devtoolbox/wiki/Configuration)** - Configuration options
- **[Examples &amp; Use Cases](https://github.com/Grazulex/laravel-devtoolbox/wiki/Examples)** - Practical usage examples
- **[CI/CD Integration](https://github.com/Grazulex/laravel-devtoolbox/wiki/CI-CD)** - Automation workflows
- **[Output Formats](https://github.com/Grazulex/laravel-devtoolbox/wiki/Output-Formats)** - Export format examples

🔧 Examples &amp; Automation
---------------------------

[](#-examples--automation)

### Daily Development Workflow

[](#daily-development-workflow)

```
# Check application health
php artisan dev:scan --all --format=count

# Find cleanup opportunities
php artisan dev:routes:unused
php artisan dev:env:diff
```

### CI/CD Integration

[](#cicd-integration)

```
# Quality gates in CI
UNUSED_ROUTES=$(php artisan dev:routes:unused --format=count | jq '.count')
if [ $UNUSED_ROUTES -gt 10 ]; then
  echo "Too many unused routes: $UNUSED_ROUTES"
  exit 1
fi
```

### Documentation Generation

[](#documentation-generation)

```
# Generate project documentation
php artisan dev:models --format=json --output=docs/models.json
php artisan dev:model:graph --format=mermaid --output=docs/relationships.mmd
php artisan dev:routes --format=json --output=docs/routes.json
```

For complete automation scripts and CI/CD configurations, visit our **[Wiki Examples](https://github.com/Grazulex/laravel-devtoolbox/wiki/Examples)**.

🔍 Use Cases
-----------

[](#-use-cases)

- **🔍 Code Reviews** - Generate comprehensive application overviews
- **📊 Performance Analysis** - Identify slow queries and bottlenecks
- **🧹 Technical Debt** - Find unused routes, orphaned models, and inconsistencies
- **📖 Documentation** - Auto-generate up-to-date application structure docs
- **⚡ CI/CD Quality Gates** - Automated quality checks and thresholds
- **🎯 Onboarding** - Help new team members understand application structure

🆕 Version Compatibility
-----------------------

[](#-version-compatibility)

Laravel DevtoolboxPHP VersionLaravel VersionStatus1.x8.3+11.x | 12.x✅ Active> **Note:** This package now fully supports both Laravel 11 and Laravel 12, ensuring compatibility across the latest LTS and current releases.

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

📄 License
---------

[](#-license)

Laravel Devtoolbox is open-sourced software licensed under the [MIT license](LICENSE.md).

---

Made with ❤️ for the Laravel community

 [Report Issues](https://github.com/grazulex/laravel-devtoolbox/issues) • [Discussions](https://github.com/grazulex/laravel-devtoolbox/discussions) • [Wiki](https://github.com/grazulex/laravel-devtoolbox/wiki)

---

💼 Need Expert Laravel Help?
---------------------------

[](#-need-expert-laravel-help)

Laravel DevToolbox is maintained by **Jean-Marc Strauven**, creator of 17+ Laravel packages with 6,000+ downloads.

### 🎯 Available for:

[](#-available-for)

**🏗️ Custom Laravel Development**Build your application from scratch or extend existing systems with clean, maintainable code.

**🔍 Code Audits &amp; Architecture Review**Deep analysis of your Laravel projects with detailed recommendations and refactoring roadmap.

- Complete codebase analysis
- Architecture documentation
- Performance bottleneck identification
- Security audit
- **Duration:** 2-3 days | **Investment:** €2,500

**⚡ Performance Optimization**Scale your Laravel application to handle millions of requests with confidence.

- Database query optimization
- Caching strategies
- Queue optimization
- Load testing and monitoring

**📦 Custom Package Development**Build tailored Laravel packages for your specific business needs.

- Internal tools and libraries
- API integrations
- Third-party service wrappers
- **Investment:** €5,000-€10,000

**👨‍🏫 Team Training &amp; Consulting**Level up your team's Laravel skills with hands-on workshops and mentoring.

- Laravel best practices
- Clean architecture principles
- Testing strategies
- **€1,500/day** for team workshops

### 👨‍💻 Experience:

[](#‍-experience)

- **15+ years** Laravel/PHP expertise
- **Ex-CTO** at Delcampe (marketplace with millions of users)
- **Chapter Lead** at BNP Paribas Fortis
- Creator of popular packages: [DevToolbox](https://github.com/Grazulex/laravel-devtoolbox), [Atlas](https://github.com/Grazulex/laravel-atlas), [ShareLink](https://github.com/Grazulex/laravel-sharelink), [Draftable](https://github.com/Grazulex/laravel-draftable)

### 📬 Get in Touch:

[](#-get-in-touch)

- 📧 **Email:**
- 💼 **LinkedIn:** [Jean-Marc Strauven](https://www.linkedin.com/in/jean-marc-strauven)
- 🌐 **Website:** [jnkconsult.be](https://grazulex.be)
- 💻 **Malt Profile:** Available for freelance projects

💡 **Working on a complex Laravel project?** Let's discuss how I can help you build better, faster, and more maintainable applications.

---

⭐ Support This Package
----------------------

[](#-support-this-package)

If Laravel DevToolbox saved you time and improved your workflow:

- **⭐ Star this repository** — Help others discover it
- **🐦 Share it** with your team and network
- **💖 [Sponsor my work](https://github.com/sponsors/Grazulex)** — Support continued development

Every star and sponsor helps me dedicate more time to maintaining and improving these tools for the Laravel community!

---

**Created with ❤️ in Belgium 🇧🇪 by [Jean-Marc Strauven](https://github.com/Grazulex)**

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance64

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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 ~8 days

Total

6

Last Release

258d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/888105bd54b6b7f7905523a16a1d08eebc2e5d39b19a4c174b5961bb4d52929b?d=identicon)[Grazulex](/maintainers/Grazulex)

---

Top Contributors

[![Grazulex](https://avatars.githubusercontent.com/u/4521546?v=4)](https://github.com/Grazulex "Grazulex (65 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

clilaravelpackagephptoolsclipestlaraveldebugDevtoolsartisaninspectorscannerphp8

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/grazulex-laravel-devtoolbox/health.svg)

```
[![Health](https://phpackages.com/badges/grazulex-laravel-devtoolbox/health.svg)](https://phpackages.com/packages/grazulex-laravel-devtoolbox)
```

PHPackages © 2026

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