Download the PHP package verseles/progressable without Composer
On this page you can find all versions of the php package verseles/progressable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download verseles/progressable
More information about verseles/progressable
Files in verseles/progressable
Package progressable
Short Description A Laravel (not only) package to track and manage progress for different tasks or processes.
License MIT
Informations about the package progressable
Progressable 🚀
A Laravel (not only) package to track and manage progress for different tasks or processes.
Installation
Install the package via Composer:
Optionally, you can publish the config file with:
Configuration
The published config file provides the following options:
Usage
This package provides a main trait: Progressable
.
With Laravel
The Progressable
trait can be used in any class that needs to track progress. It provides two main methods: updateLocalProgress
and getLocalProgress
.
"Local" refers to the progress of your class/model/etc, while "Overall" represents the sum of all Progressable classes using the same key name.
Example
- Use
setOverallUniqueName
to associate the progress with a specific overall progress instance. setLocalProgress
updates the progress for the current instance.getLocalProgress
retrieves the current progress.getOverallProgress
retrieves the overall progress data.resetOverallProgress
resets the overall progress (recommended after setting the unique name for the first time).
The progress value ranges from 0 to 100.
Without Laravel
You can use the Progressable
trait without Laravel by providing custom save and get data methods.
Example
Testing
To run the tests, execute the following command:
License
The Progressable package is open-sourced software licensed under the MIT license.
All versions of progressable with dependencies
illuminate/support Version ^v11
illuminate/cache Version ^11
illuminate/contracts Version ^11