oss-tools/laravel-recurring

Package for adding recurring functionality to laravel models.

v1.0.1 2023-07-28 05:46 UTC

This package is auto-updated.

Last update: 2024-10-28 08:18:22 UTC


README

Latest Version Software License GitHub Workflow Status Check & fix styling Total Downloads

Note: This package is still in active development so breaking changes may be applied before v1 is released. Please proceed with caution.

This package adds a recurring relation to laravel models.

Installation

You can install the package via composer:

composer require oss-tools/laravel-recurring

Usage

use OSSTools\Recurring\Contracts\IsRecurring;
use OSSTools\Recurring\Traits\RecurringTrait;

class Event extends Model implements IsRecurring
{
    use RecurringTrait;

    public function getRecurringOptions()
    {
        return [
            'start_date' => 'starts_at',
            'end_date' => 'ends_at',
        ];
    }
}

Testing

composer test

License

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