How many hours have lost debugging local jobs only to find out that you forgot to restart Horizon?
Laravel Horizon Watcher package contains an Artisan command horizon:watch
that will start Horizon and automatically restart it when any PHP file is created, updated, or deleted.
This command is meant to be used in the local environment.
Installation
You can install the package via composer:
composer require spatie/laravel-horizon-watcher --dev
In your project, you should have the JavaScript package chokidar installed. You can install it.
via npm
npm install chokidar
or Yarn
yarn add chokidar
Optionally, you can publish the config file with this command:
php artisan vendor:publish --tag="horizon-watcher-config"
Usage
Run this command
php artisan horizon:watch
to start Horizon. When a PHP file in your project gets created, updated, or deleted, Horizon will automatically restart.
For more details and source code, please visit Github.
Closing Note
The team of Codebrisk Laravel developers is always ready to execute even your boldest ideas. Our expert team can design and develop any type of custom CRM solution, SAAS app, or e-commerce app to meet our customer's needs and transform our customer's experiences. Get in touch with our team to discuss your bespoke ideas and learn more about the next steps to launching cooperation.
0 comments:
Post a Comment
Thanks