dainsys/ring_central
最新稳定版本:v0.2.2
Composer 安装命令:
composer require dainsys/ring_central
包简介
A full stack package to add ring_central functionality to Laravel applications.
README 文档
README
Extends ring central reports functionality.
Installation
- Require using composer:
composer require dainsys/ring_central. - Add DB Connection values in your .env file:
RC_DB_HOST=
RC_DB_DATABASE=
RC_DB_USERNAME=
RC_DB_PASSWORD=
RC_DB_DRIVER=
- Run the migrations:
php artisan migrate
Ussage
- Make sure your commands extednds the
\Dainsys\RingCentral\Console\Commands\AbstractProductionReportCommand. Alternatively, you may use therc:make-commandcommand to create your reports. - Your signature property must provide a required attribute for
dates, which is required to run the reports. If none passed, today's date will be assumed. - This package uses
dainsys/mailingpackage under the hood More details. Or, make sure to provide implementation for therecipientsmethod.- Using
dainsys/mailingpackage:- Visit url
/mailing/admin/mailablesin your app and create a mailable record with the class name of the command. For current example,App\Console\Commands\PublishingProductionReport. - Visit url
/mailing/admin/recipientsto create new recipients associate them with the created mailable report.
- Visit url
- Providing your oun implementation in your report commands:
protected function recipients(): array { return []; }
- Using
- Provide implementation to all abstract methods required. Use the following code as an example.
<?php namespace App\Console\Commands; use Dainsys\RingCentral\Console\Commands\ProductionReportCommand; class PublishingProductionReport extends ProductionReportCommand { /** * The name and signature of the console command. * * @var string */ protected $signature = 'publishing:production-report {dates?} Range of dates between the data will be queried. Exc: 2023-01-01 or 2023-01-01,2023-01-02. Today\'s date will be assumed if not passed! '; /** * List of dialGroups to query. Provide all dialGroups. * * @return array */ public function dialGroups(): array { // return ['PUB%']; } /** * List of teams to query. * * @return array */ public function teams(): array { // return ['ECC%']; } /** * Email subject */ public function subject(): string { return str($this->name)->replace(':', ' ')->headline(); } }
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-23