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
Requires
- php: ^8.0
- laravel/framework: ^9.0|^10.0|^11.0|^12.0
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
- Start your Laravel server:
php artisan serve
- Visit test URLs:
http://localhost:8000/test-dump- Simple dump testhttp://localhost:8000/test-complex- Complex data test
- 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
- Auto-Detection: Automatically finds the macOS app on ports 9999, 9998, 9997
- Zero Configuration: No manual setup required
- Smart Fallback: Graceful handling when app isn't running
- 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
- GitHub: @sinarahmany
- Website: sinarahmannejad.com
- LinkedIn: sina-rahmannejad
๐ Acknowledgments
- Laravel Framework
- macOS Development Community
- Open Source Contributors