Download the PHP package exfriend/laravel-overseer without Composer
On this page you can find all versions of the php package exfriend/laravel-overseer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-overseer
Allows to control artisan commands from Web/API.
Overview
This package is designed primarily to control various background tasks from admin dashboard of your application.
Once installed, Laravel Overseer will provide a flexible JSON API to check, start, stop, monitor your commands in real-time.
When used with overseer-bootstrap it will also give you a fully functional dashboard pages written in VueJS with Twitter Bootstrap 3.
If you use a different frontend or want to customize any part of it, you can publish the assets and/or use them as a reference to write your own frontend on top of Overseer's API.
All you have to do is extend your Artisan command from Exfriend\Overseer\Command
instead of Illuminate\Console\Command
.
Installation
composer require exfriend/laravel-overseer
or
composer require exfriend/overseer-bootstrap
for bootstrap version with frontend.
Then, add the package's service provider to your config/app.php:
Make a directory to store the logs:
Example command
Now you are ready to create your first Overseer Command. Basically it's very much like Laravel's console command but there are couple of differences.
The command above describes how your real commands should look like.
Using the API
GET http://your_project/overseer/api/commands
GET http://your_project/overseer/api/command?command=App\Robots\Rozetka\Command
GET http://your_project/overseer/api/current_log?command=App\Robots\Rozetka\Command
GET http://your_project/overseer/api/run?command=App\Robots\Rozetka\Command
GET http://your_project/overseer/api/stop?command=App\Robots\Rozetka\Command
GET http://your_project/overseer/api/unlock?command=App\Robots\Rozetka\Command
Mutex locks
Overseer uses mechanism called Mutual Exclusion to prevent your task overlapping. Sometimes it is useful to use "unlock" command to delete the mutex file. This can be used e.g. if your task died with uncaught exception and was unable to delete the lock file properly. In this case your system will consider this task as running until you delete the lock file manually or by using unlock api method.
Console improvements
Overseers adds 2 options to every command you run from console:
GUI
If you're looking for a webpage-based user interface for this package, make sure to check out overseer-bootstrap.
Contributing
This package is work-in-progress. Pull requests are welcome. There is so much work ahead!