acdphp / laravel-schedule-police
Stop, start or execute scheduled commands from a simple dashboard without redeploying, while maintaining the visibility, control, and reviewability of the configurations in your codebase.
Installs: 3 640
Dependents: 0
Suggesters: 0
Security: 0
Stars: 52
Watchers: 2
Forks: 7
Open Issues: 0
Requires
- php: ^8.2
- laravel/framework: ^11.0
Requires (Dev)
- ekino/phpstan-banned-code: ^1.0
- larastan/larastan: ^2.9
- laravel/pint: ^1.15
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/phpstan: ^1.10
README
Use this if you need to:
- ✅ Stop and start scheduled commands without redeploying.
- ✅ Execute commands without going into server console.
- ✅ Keep the visibility, control, and reviewability of the schedule configurations in your codebase.
Compatibility Matrix
Installation
-
Install the package
composer require acdphp/laravel-schedule-police
-
Run the migration.
php artisan migrate
-
Publish assets
php artisan vendor:publish --tag=schedule-police-assets --force
Config
You may override the config by publishing it.
php artisan vendor:publish --tag=schedule-police-config
You may also just define environment variables if you don't need to publish the config.
- Disable command execution in the dashboard.
SCHEDULE_POLICE_ALLOW_EXECUTE_CMD=false
- Add prefix to routes.
SCHEDULE_POLICE_URL_PREFIX=your-prefix
Dashboard
After installation, you may access the dashboard via the /schedule-police
route.
Authorization
By default, you will only be able to access this dashboard in the local environment. However, you may specify authorization for non-local environments by defining viewSchedulePolice
gate, typically within the boot
method of the App\Providers\AuthServiceProvider
class.
public function boot(): void { Gate::define('viewSchedulePolice', function (User $user) { // return true or false }); }
Screenshots
Events list page
Execute page
License
The MIT License (MIT). Please see License File for more information.