infinity-it/e-commerce-google-calendar 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

README

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

    • GEventColorId::LAVENDER
    • GEventColorId::SAGE
    • GEventColorId::GRAPE
    • GEventColorId::FLAMINGO
    • GEventColorId::BANANA
    • GEventColorId::TANGERINE
    • GEventColorId::PEACOCK
    • GEventColorId::GRAPHITE
    • GEventColorId::BLUEBERRY
    • GEventColorId::BASIL
    • GEventColorId::TOMATO
  • 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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2024-11-11