定制 remeritus/livewire-rrule-generator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

remeritus/livewire-rrule-generator

最新稳定版本:0.2.1

Composer 安装命令:

composer require remeritus/livewire-rrule-generator

包简介

Generates RRule string using Livewire.

README 文档

README

Livewire RRule Generator

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Livewire Rrule Generator is a GUI for rlanvin/php-rrule. It generates RRULE from RFC 5545 complaint strings that can be used to manage recurring events.

Functionality is limited to Daily/Weekly/Monthly/Yearly rrules and GUI mimics Google Calendar approach.

Installation

You can install the package via composer:

composer require remeritus/livewire-rrule-generator

You can publish the config file with:

php artisan vendor:publish --tag="livewire-rrule-generator_without_prefix-config"

This is the content of the published config file:

return [
    'title'         => 'Define Schedule',
    'includeWeekend' => TRUE,
    'frequencies' => [
        'DAILY'     => TRUE,
        'WEEKLY'    => TRUE,
        'MONTHLY'   => TRUE,
        'YEARLY'    => TRUE,
    ],
    'defaultView'   => 'WEEKLY',
    'weekStarts'    => 'MO',
];

Setup

TailwindCSS

Add these additional lines into your tailwind.config.js file:

// use `purge` instead of `content` if using TailwindCSS v2.x
content: [
    './vendor/remeritus/livewire-rrule-generator/resources/views/**/*.blade.php',
    // etc...
]

Usage

In your views

If you want to create new Rrule string

<livewire:rrule-generator/>

If you want to edit existing Rrule string

If you want to edit existing RRule you can pass it to rrule-string

<livewire:rrule-generator rrule-string='FREQ=WEEKLY;COUNT=30;INTERVAL=1' />

Accessing RRule String

  • There is an <input type="hidden" ... name="rrule_string"/> from which you can extract the RRule String. So if you place <livewire:rrule-generator/> within a form it will be part of the forms data.
  • You can also listen to livewire event rruleCreated, which emits RRule String on Rrule's creation.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 39
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-01-17