gterrusa/laravel-nova-google-calendar

一个 Laravel Nova 工具。

0.3.2 2023-05-16 18:28 UTC

README

Latest Version on Packagist Total Downloads

一个提供 Google Calendar 接口的 Laravel Nova 工具。

安装

您可以通过 composer 安装此包

composer require gterrusa/laravel-nova-google-calendar

您可以使用以下命令发布配置文件

php artisan vendor:publish --provider="GTerrusa\LaravelNovaGoogleCalendar\ToolServiceProvider"

这是已发布配置文件的内容

<?php

return [
    /**
     * The accessor name of the attribute on your User model
     * to use to check if a User is an Admin.
     * Set to null to give all User's Admin privileges.
     */
    'user_admin_boolean' => null,

    /**
     * Should attendees be saved to Laravel Database?
     */
    'save_attendees_to_db' => false,

    /**
     * If saving attendees to Laravel Database, what path should be used to save them?
     */
    'attendee_create_or_update_path' => '/api/leads/createOrUpdate',

    /**
     * Additional data to send to the Laravel database.
     *
     * example:
     * 'db_attendee_additional_info' => [
     *     [
     *         'field' => 'picked_up',
     *         'label' => 'Picked Up',
     *         'input' => 'checkbox',
     *         'type' => 'boolean',
     *         'default' => false,
     *         'calendars' => [
     *             'Gift Card Pick-Up'
     *         ]
     *     ],
     *     [
     *         'field' => 'gift_card_no',
     *         'label' => 'Gift Card Number',
     *         'input' => 'text',
     *         'type' => 'string',
     *         'default' => '',
     *         'calendars' => [
     *             'Gift Card Pick-Up'
     *         ]
     *     ]
     * ],
     */
    'db_attendee_additional_info' => [],

    /**
     * The endpoint to fetch the additional data from the Laravel database.
     * Should be a 'POST' endpoint, and accept an array called 'attendees'
     * and return the same array with the additional data appended to each attendee.
     */
    'fetch_db_attendee_additional_info_path' => null,

    /**
     * An array of Calendar's that don't allow attendees to be added via the Calendar tool.
     *
     * example:
     * 'add_attendees_disabled' => ['Gift Card Pick-Up'],
     */
    'add_attendees_disabled' => [],

    /**
     * Send Google Calendar Event Summary by default?
     */
    'default_event_summary' => false,
];

设置

  1. 请遵循以下设置步骤 这里
  2. 将工具包含在您的 NovaServiceProvider 中
    ...
    use GTerrusa\LaravelNovaGoogleCalendar\LaravelNovaGoogleCalendar;
    
    ...

    public function tools()
    {
        return [
            ...,
            new LaravelNovaGoogleCalendar()
        ];
    }

更新日志

有关最近更改的详细信息,请参阅 更新日志

贡献

有关详细信息,请参阅 贡献指南

安全漏洞

请查看 我们的安全策略 了解如何报告安全漏洞。

致谢

许可

MIT 许可证 (MIT)。有关更多信息,请参阅 许可文件