Download the PHP package hxm/laravel-planning without Composer

On this page you can find all versions of the php package hxm/laravel-planning. 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-planning

Laravel Planning

Laravel Planning is a library that supports creating and managing plans in Laravel projects.


Features

Requirements

Installation

Install the package via Composer:

Configuration

After installation, you can publish the configuration file using the following command:

You can also publish the migration files using:

Default Configurations

Below are the default configurations:

Directory Tree Representation

Resource Management

The plans operate based on resource models. To create a plan for App\User, add it to the resources array in the configuration file:

Alternatively, you can dynamically add resources in the AppServiceProvider:

Implementing PlanResourceInstance

Before creating plan cycles for a resource (e.g., User), you must implement the PlanResourceInstance interface in your model and use the HasPlanResourceInstance trait:

Panel Management

Laravel Planning provides a built-in panel interface to manage plans. The panel settings are defined in the configuration under the pannel key:

By default, the panel is enabled. You can disable it by setting "enable" to false. If the panel is disabled, you will need to create your own implementation for managing plans.

To access the panel, visit:

Using the Panel

  1. Navigate to the Create section to create a new plan via the form.
  2. Once a plan is created, add items to it. These items represent the features or content activated by the plan. Costs and prices can be set for each item.
  3. If the cycle is set to 0, the items will repeat across cycles.

Usage

Here is an example of how to use the library:

Creating a Plan Order for a Resource

To create a plan order for a User resource:

Managing Plan Cycles

After saving the plan order, you can retrieve its cycles:

You can associate a payment with the retrieved cycle:

By default, the plan cycle will have a status of inactive (status = 0). You can define your custom logic for handling this state.

To update the cycle's status, you can use:

When a cycle's status is updated to 1, a schedule is automatically created to generate the next cycle. The schedule's configuration is defined in the config file. You can listen for events such as PlanCycleCreatedEvent or PlanCycleUpdatedStatusEvent to add custom logic when new cycles are created or their statuses are updated.

Querying Resources with Cycles

You can query resources along with their current cycles:

Or retrieve a list of users with active cycles (status = 1):

Contact

Please contact me if you need assistance Email.

You can also donate to me at Paypal

Contribution

We welcome contributions! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch: git checkout -b new-feature.
  3. Commit your changes: git commit -m 'Add new feature'.
  4. Push to your branch: git push origin new-feature.
  5. Submit a pull request.

License

This package is open-sourced software licensed under the MIT license.


All versions of laravel-planning with dependencies

PHP Build Version
Package Version
Requires illuminate/database Version ^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
yajra/laravel-datatables-oracle Version ^9.0
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 hxm/laravel-planning contains the following files

Loading the files please wait ....