sinarahmany/laravel-dump-mac-viewer

Zero-configuration Laravel dump integration for macOS Laravel Dump Viewer

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

pkg:composer/sinarahmany/laravel-dump-mac-viewer

v1.0.3 2025-10-25 06:18 UTC

This package is auto-updated.

Last update: 2025-10-25 06:18:17 UTC


README

A zero-configuration Laravel package that integrates with the Laravel Dump macOS Viewer app for real-time debugging.

๐Ÿš€ Features

  • Zero Configuration - Works out of the box
  • Auto-Detection - Automatically finds the macOS app
  • Multiple Functions - app_dump(), app_dd(), app_var_dump(), app_print_r()
  • Smart Fallback - Graceful handling when macOS app isn't running
  • Laravel Integration - Works in routes, controllers, models, commands

๐Ÿ“ฆ Installation

Option 1: Composer Package (Recommended)

composer require sinarahmany/laravel-dump-mac-viewer --dev
php artisan laravel-dump:setup

Option 2: Automated Installer

curl -sSL https://raw.githubusercontent.com/sinarahmany/laravel-dump/main/install.sh | bash

Option 3: Manual Setup

curl -sSL https://raw.githubusercontent.com/sinarahmany/laravel-dump/main/setup-laravel-dump.php | php

๐ŸŽฎ Usage

After installation, these functions are immediately available:

// In any Laravel file (routes, controllers, models, etc.)
app_dump($data);           // Dump to macOS app
app_dd($data);            // Dump and die
app_var_dump($data);      // Var dump
app_print_r($data);       // Print_r

// Examples
app_dump(['user' => 'John', 'age' => 30]);
app_dd($request->all());

๐Ÿงช Testing

  1. Start your Laravel server:
php artisan serve
  1. Visit test URLs:
  • http://localhost:8000/test-dump - Simple dump test
  • http://localhost:8000/test-complex - Complex data test
  1. Start your macOS Laravel Dump app and watch the dumps appear!

๐Ÿ”ง Configuration

The package works with zero configuration, but you can customize it:

php artisan vendor:publish --tag=laravel-dump-config

Then edit config/laravel-dump.php:

return [
    'server_url' => 'http://localhost:9999',  // Custom server URL
    'auto_detect' => true,                   // Auto-detect macOS app
    'enabled' => true,                       // Enable/disable integration
    'ports' => [9999, 9998, 9997],         // Ports to check
    'timeout' => 1,                         // Request timeout
];

๐ŸŒ Environment Variables

LARAVEL_DUMP_SERVER_URL=http://localhost:9999
LARAVEL_DUMP_AUTO_DETECT=true
LARAVEL_DUMP_ENABLED=true
LARAVEL_DUMP_TIMEOUT=1

๐Ÿ“‹ Requirements

  • PHP 8.0+
  • Laravel 9.0+
  • macOS Laravel Dump Viewer app

๐ŸŽฏ How It Works

  1. Auto-Detection: Automatically finds the macOS app on ports 9999, 9998, 9997
  2. Zero Configuration: No manual setup required
  3. Smart Fallback: Graceful handling when app isn't running
  4. Performance: 1-second timeout to avoid blocking your app

๐Ÿš€ Quick Start

# Install the package
composer require sinarahmany/laravel-dump-mac-viewer --dev

# Run setup (optional)
php artisan laravel-dump:setup

# Start using immediately
app_dump('Hello from Laravel!');

๐Ÿ“– Documentation

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

This project is open source and available under the MIT License.

๐Ÿ‘จโ€๐Ÿ’ป Author

Sina Rahmannejad

๐Ÿ™ Acknowledgments

  • Laravel Framework
  • macOS Development Community
  • Open Source Contributors