kapersoft/knocker-for-laravel
最新稳定版本:v1.0.1
Composer 安装命令:
composer require kapersoft/knocker-for-laravel
包简介
This is my package knocker-for-laravel
README 文档
README
A Laravel package that seamlessly integrates your application with Knocker for Laravel Cloud - a reliable service that ensures your scheduled tasks continue running even when your Laravel application is in hibernation mode.
Learn more about Knocker for Laravel Cloud at https://knocker.laravel.cloud.
Requirements
- PHP 8.3 or higher
- Laravel 12.0 or higher
Installation
Install the package using Composer:
composer require kapersoft/knocker-for-laravel
Publish configuration file
If you like, you can publish the configuration file:
php artisan vendor:publish --tag="knocker-for-laravel-config"
This will create a configuration file with the following structure:
return [ 'endpoint' => env('KNOCKER_ENDPOINT', 'https://knocker.laravel.cloud/api/v1/schedulerTasks'), 'token' => env('KNOCKER_TOKEN', ''), ];
Configuration
After registering your application on Knocker for Laravel Cloud, add your authentication token to the .env file:
KNOCKER_TOKEN=your-knocker-token-here
Usage
Registering Scheduled Tasks
To register your application's scheduled tasks with Knocker for Laravel Cloud, run the following command:
php artisan knocker:send-scheduler-tasks
This command performs the following actions:
- Scans your scheduled tasks. These are usually in
routes/console.phporapp/Console/Kernel.php - Extracts task configurations including:
- Cron expressions and timing
- Command names and descriptions
- Timezone settings
- Callback functions and closures
- Uploads the task information to Knocker for Laravel Cloud
Deployment Integration
For seamless integration, add the registration command to your deployment pipeline:
php artisan knocker:send-scheduler-tasks
This ensures your task configurations are automatically updated with each deployment, keeping Knocker for Laravel Cloud synchronized with your latest scheduled tasks.
Testing
Run the test suite:
composer test
Documentation
Please see the following files for additional information:
- CHANGELOG - Recent changes and version history
- CONTRIBUTING - Contribution guidelines
- LICENSE - MIT License details
Security
Please review our security policy for information on reporting security vulnerabilities.
Credits
- Jan Willem Kaper - Package Author
- All Contributors - Community Contributors
License
This package is open-sourced software licensed under the MIT License.
统计信息
- 总下载量: 1.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-24