Hot reload for Laravel Jobs — automatically restart your queue workers when job files change during development.
When working on Laravel Jobs, you often have to stop and restart the queue worker manually to see your code changes take effect. This repetitive process slows down development and wastes time.
Hot Reload for Laravel Jobs — inspired by JavaScript frameworks, this tool watches the app/Jobs
directory and automatically restarts the Laravel queue worker whenever it detects PHP file changes. No more manual restarts; just code and watch your changes take effect immediately.
Install via composer:
composer require christopherpeacock/laravel-job-watcher
Run from your Laravel project root folder:
php vendor/christopherpeacock/laravel-job-watcher/bin/laravel-job-watcher.php
The watcher will:
- Monitor the
app/Jobs
directory for any PHP file changes - Automatically restart the Laravel queue worker upon detecting changes
- Print clear status messages to keep you informed
- Keep your development workflow smooth and uninterrupted
$ vendor/bin/laravel-job-watcher
- PHP 8.0 or higher
- Laravel 9.0 or higher
The job watcher uses file system events to monitor changes in your job files. When a change is detected:
- The current queue worker process is gracefully terminated
- A new queue worker is started automatically
- Your updated job code is now active without manual intervention
- Faster Development: No more manual queue worker restarts
- Improved Workflow: Focus on coding, not process management
- Real-time Testing: See your job changes immediately
- Error Prevention: Avoid forgetting to restart workers
- Christopher Peacock -> (https://github.com/ChristopherPeacock)