Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Devtools Laravel Package

siguici/laravel-devtools

A lightweight set of dev tools for Laravel to speed up local development. Adds helpful debugging and productivity utilities you can enable in development environments to inspect requests, log output, and streamline common workflow tasks.

Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation

    composer require --dev siguici/laravel-devtools
    

    Publish the config (if needed):

    php artisan vendor:publish --provider="Siguici\DevTools\DevToolsServiceProvider" --tag="config"
    
  2. First Use Case: Debugging Routes Run the route inspector:

    php artisan devtools:routes
    

    This lists all registered routes with their methods, middleware, and namespaces.

  3. Quick Wins

    • View Helpers: Use devtools:view to inspect Blade templates and their sections.
    • Queue Inspection: Check pending jobs with php artisan devtools:queues.

Implementation Patterns

Workflows

  1. Debugging Middleware Use php artisan devtools:middleware to list all middleware groups and their bindings. Combine with php artisan route:list to trace middleware execution paths.

  2. Database Schema Exploration Generate a visual schema diagram:

    php artisan devtools:schema --output=public/schema.png
    

    Integrate this into CI/CD pipelines for documentation.

  3. Artisan Command Automation Automate repetitive tasks (e.g., clearing caches, optimizing configs):

    php artisan devtools:optimize
    
  4. Environment-Specific Checks Validate environment variables with:

    php artisan devtools:env
    

    Useful for local vs. production parity checks.

Integration Tips

  • Laravel Forge/C Forge: Add devtools:routes to deployment scripts to audit routes post-deploy.
  • Laravel Mix/Vite: Use devtools:assets to debug asset compilation issues.
  • Testing: Extend PHPUnit tests with DevTools\Assertions for custom assertions (e.g., route existence checks).

Gotchas and Tips

Pitfalls

  1. Performance Overhead Avoid running devtools:routes or devtools:schema in production. These commands are dev-only and may lock tables or slow down the app.

  2. Config Conflicts If publishing the config, ensure devtools.php doesn’t override critical Laravel settings (e.g., app.debug). Defaults are safe, but custom values may break expected behavior.

  3. Deprecated Features The package is archived (last release: 2026). Some commands (e.g., devtools:cache) may rely on Laravel 10+ features. Test thoroughly on your Laravel version.

  4. Blade Template Caching devtools:view may return stale data if Blade templates are cached. Clear the view cache first:

    php artisan view:clear
    

Debugging Tips

  • Silent Failures: Commands like devtools:queues may exit silently if the queue driver is misconfigured. Add --verbose for details:
    php artisan devtools:queues --verbose
    
  • Route Debugging: Use php artisan devtools:routes --json to pipe output to tools like jq for programmatic analysis:
    php artisan devtools:routes --json | jq '.[] | select(.method == "GET")'
    
  • Middleware Chaining: For complex middleware stacks, combine with Laravel’s dd() in middleware methods to trace execution:
    public function handle($request, Closure $next) {
        dd('Middleware hit', $request->route()->uri); // Debug here
        return $next($request);
    }
    

Extension Points

  1. Custom Commands Extend the package by creating a custom Artisan command that leverages its helpers:

    use Siguici\DevTools\Support\Facades\DevTools;
    
    class MyCustomCommand extends Command {
        protected $signature = 'my:command';
        public function handle() {
            $routes = DevTools::routes();
            // Custom logic...
        }
    }
    
  2. Hooks Override default behaviors by binding your own implementations to the package’s service container. Example:

    $this->app->bind(
        \Siguici\DevTools\Contracts\RouteInspector::class,
        MyCustomRouteInspector::class
    );
    
  3. Asset Debugging Use the devtools:assets output to generate a custom asset manifest for your frontend build process.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
phpshko/laravel-livewire-depdrop
larasell-dev/larasell
calliostro/spotify-bundle
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer