Download the PHP package byrcsc/laravel-approval without Composer

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

Laravel Approval

Latest Version on Packagist GitHub Tests Action Status GitHub PHPStan Action Status Total Downloads

Multi-stage approval workflows for Eloquent models: database-backed workflow definitions, configurable approval and rejection rules, attribute drafts held until approval, and a verifiable action history.

The package provides the approval engine. Your application keeps ownership of its UI, users, roles, and organizational rules.

Laravel Tested PHP versions
12.x 8.3, 8.4
13.x 8.3, 8.4

Installation

Install the package and publish its migration:

Publish the configuration before the migration when you need custom table names or non-integer user identities:

Set APPROVAL_USER_KEY_TYPE to uuid, ulid, or string as needed. The approvable model key is independent; adjust approvable_id in the published migration when those models do not use integer keys.

Notification wording and its mail views publish separately, and only when you want to change them:

What the package approves

An approval request is one execution of an approval workflow for one already-persisted record. A workflow is made of ordered approval stages, each holding one approval assignment per approver. An approver records an approval decision: approve, reject, or return for revision.

The package controls approval state and history. It does not control your model's lifecycle:

If you need creation, publication, or visibility gating, keep that in your application, driven by the package's events and request state.

Quick start

Add Approvable to the model that needs approval:

Create a workflow and its ordered approval stages. These are ordinary Eloquent models, so workflow management screens remain part of your application.

required_approvals is the number of approvals the stage needs. Omit it, or set it to null, and every resolved assignment must approve. Fluent definitions, array definitions, persisted rows, and request snapshots all read omission the same way.

Submit the record, optionally with the attribute changes the approval is for, and record a decision:

The new amount is not written to the order until the last required approval is recorded. Until then it is held on the request and readable through $order->pendingDraft()->new.

That is the whole loop. Approver resolvers, drafts, delegation, escalation, authorization, and the rest are in the documentation.

What is included

Important behavior

Audit guarantees

The action history is application-enforced append-only and tamper-evident within a stated trust boundary. It is not immutable, tamper-proof, or externally anchored.

approval:verify reports findings and never repairs. A clean result covers:

A clean result does not cover:

The package provides no cryptographic signatures, HMAC protection, external hash anchoring, or write-once storage.

Out of scope

The package draws its edges deliberately. What follows describes what it sets out to do rather than what it might do later: treat none of it as planned work, and none of it as ruled out forever.

Documentation

Development

The local checks mirror CI:

PHPStan runs at max with no baseline. Tests use SQLite locally and run against MySQL and PostgreSQL in CI. tests/Release/ pins the public surface and the documented guarantees. A failure there is asking whether you meant to change the API. See CONTRIBUTING.md.

workbench/ is a bootable demo application that installs the package the way a real application would, and exercises every integration seam: resolvers, workflow and stage conditions, guard mode, drafts and conflicts, escalation, delegation, evidence, notifications, and a policy above this package's. composer build sets it up; see workbench/README.md for the demo loop.

Versioning

The package follows semantic versioning.

Bug fixes go into the newest version only. To get a fix, upgrade to it.

Questions and issues

This package is maintained by one person, so replies can take a while. Everything gets read.

Credits

License

MIT. See CHANGELOG.md.


All versions of laravel-approval with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/auth Version ^12.0||^13.0
illuminate/console Version ^12.0||^13.0
illuminate/contracts Version ^12.0||^13.0
illuminate/database Version ^12.0||^13.0
illuminate/events Version ^12.0||^13.0
illuminate/notifications Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
spatie/laravel-package-tools Version ^1.16
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 byrcsc/laravel-approval contains the following files

Loading the files please wait ...