Download the PHP package aurorawebsoftware/arflow without Composer

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

ArFlow Workflow and State Machine Laravel Package Documentation

Introduction

ArFlow is a Laravel package that allows you to implement workflow management for your Laravel Eloquent models. This documentation provides a comprehensive guide on how to use ArFlow effectively.

Key Concepts

1. Workflows

A workflow represents a series of states and transitions that a model can go through. Key points about workflows:

2. States

States represent the different stages that a model can exist in within a workflow. Key points about states:

3. Transitions

Transitions define the rules and conditions for moving a model from one state to another within a workflow. Key points about transitions:

4. Guards

Guards are conditions or checks that must be satisfied for a transition to occur. Key points about guards:

5. Actions

Actions are tasks or operations that are executed during a transition. Key points about actions:

6. Success Jobs

Success jobs are jobs or tasks that are dispatched after a successful transition. Key points about success jobs:

7. Initial State

Each workflow has an initial state that a model enters when the workflow is applied. Key points about the initial state:

Installation

You can install the ArFlow package via Composer. Run the following command:

Next, you need to publish the package configuration and migration files:

don't forget to run the migration:

Model Setup

To use ArFlow in your model, follow these steps:

  1. Use the HasState trait in your model class.

This trait provides functionality that allows a model to be a part of a workflow, fetch configurations, get initial states, and perform transitions.

  1. Implement the StateableModelContract interface in your model class.

This interface ensures your model has the required methods to function as a stateable entity. This includes setting workflow attributes, state attributes, and metadata attributes. You can also determine supported workflows, apply workflows, and make transitions. Below are sample usages:

  1. (Optional) Define the workflow-related attributes for your model in the model class if you want to change default values or skip this step:

Usage

Now that you've set up your model, you can apply workflows and perform transitions:

Applying a Workflow

To apply a workflow to a model instance, use the applyWorkflow method:

To get the current workflow of a model:

To get the current state of a model:

`

Checking Transition States

You can check if a transition to a specific state is allowed using the canTransitionTo method:

Transitioning to a State

To transition a model to a new state, use the transitionTo method:

Getting Defined and Allowed Transition States

You can retrieve the defined and allowed transition states for a model:

TransitionGuardResults

You can also get transition guard results using the transitionGuardResults method:

This method returns a collection of transition guard results, which can be used to check if guards allow the transition.

Configuration

You can configure your workflows in the config/arflow.php file. Define your workflows, states, transitions, guards, and actions there.

Sample Configuration

Here's a sample configuration for a workflow:

Blueprint Macro

To simplify adding state columns to your migrations, a Blueprint macro is provided: This macro $table->arflow() will create three columns: workflow, state, and state_metadata.

Creating Transition Guards

Sample Transition Guard Implementation.

Creating Transition Action

Sample Transition Action

Creating Transition Success Job

Sample Transition Job

Contribution


This documentation should help you get started with the ArFlow package in your Laravel application. Feel free to explore more features and configurations based on your project's requirements.

For more information, please refer to the package's GitHub repository or contact us for support.


All versions of arflow with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2|^8.3
spatie/laravel-package-tools Version ^1.14.0
laravel/framework Version ^11.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 aurorawebsoftware/arflow contains the following files

Loading the files please wait ....