infinity-it/e-commerce-google-calendar
Composer 安装命令:
composer require infinity-it/e-commerce-google-calendar
包简介
README 文档
README
E-Commerce Google Calendar
1. Installation
composer require "infinity-it/e-commerce-google-calendar"
2. Configuration file
3. Implement Model
namespace App\Models; use ECommerce\EGoogleCalendar\Interfaces\GEventInterface; use ECommerce\EGoogleCalendar\Traits\GEventTrait; class MyModel implements GEventInterface { use GEventTrait; function toGEvent(\Spatie\GoogleCalendar\Event &$event) { // TODO: Implement toGEvent() method. // $event->name = $this->title; // $event->description = $this->description; // $event->startDateTime = $this->start; // $event->endDateTime = $this->end; // ... } function getGEventIdKey(): string { // TODO: Implement getGEventIdKey() method. // return 'event_id'; } }
4. usage
$my_model = App\Models\MyModel::find(1); $my_model->saveInGCalendar(); $my_model->start = \Carbon\Carbon::now(); $my_model->updateInGCalendar();
5. Check Google Calendar connection
php artisan calendar:check
Google Event Colors:
-
Import:
use ECommerce\EGoogleCalendar\Enums\GEventColorId;
-
Colors
-
Usage:
use Spatie\GoogleCalendar\Event; use ECommerce\EGoogleCalendar\Enums\GEventColorId; // ... function toGEvent(Event &$event): void { $event->setColorId(GEventColorId::TOMATO->value); } // ...
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2024-11-11