Download the PHP package mohammedmanssour/laravel-recurring-models without Composer

On this page you can find all versions of the php package mohammedmanssour/laravel-recurring-models. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-recurring-models

Laravel Recurring Models

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

Introducing our Laravel Recurring package - the ultimate solution for adding recurring functionality to your Laravel Models! Whether you need simple daily, weekly, or every n days recurrence, or more complex patterns like repeating a model on the second Friday of every month, our package has got you covered. With a seamless integration into your Laravel application, you can easily manage and automate recurring tasks with just a few lines of code.

Installation

You can install the package via composer:

You can publish and run the migrations with:

Usage

Adding the recurring functionality to Models:

  1. Make sure you models implements Repeatable Contract.

  2. Add the Repeatable trait to your Model

  3. Optionaly, customize Model base date.

Model Recurring rules

The Repeatable trait has repeat method that will help you define the recurrence rules for the model.

The repeat method will return Repeat helper class that has 4 methods: daily, everyNDays, weekly, and complex

1. Daily Recurrence

This will help you to create daily recurring rule for the model.

The recurrence will start the next day based on the repetitionBaseDate returned value.

2. Every N Days Recurrence

This will help you to create every N Days recurring rules for the model.

The recurrence will start after n=3 days based on the repetitionBaseDate returned value.

3. Weekly Recurrence

This will help ypi create weekly recurrence rule for the model.

The recurrence will start after 7 days based on the repetitionBaseDate returned value.

You can specify the days of the recurrence using the on method.

4. Complex Recurrence.

This will help you create complex recurrence rules for the task.

Examples
  1. Repeat model on the second friday of every month.

  2. Repeat model on the 15th day of every month.

Model Scopes

use whereOccurresOn scope to get models that occurres on a specific date.

use whereOccurresBetween scope to get the models that occurres between two sepcific dates.

1. End Recurrance

use endsAt to end occurrance on a specific date

use endsAfter to end occurrance after n times.

2. Start Recurrance

use startsAt method to start occurrance after a specific date.

Testing

Credits

License

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


All versions of laravel-recurring-models with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^11.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mohammedmanssour/laravel-recurring-models contains the following files

Loading the files please wait ....