Skip to content

Tired of repeating the status control of your models again and again? Well, here it's already done.

License

Notifications You must be signed in to change notification settings

omatech/laravel-statusable

Repository files navigation

Laravel Statusable

Latest Version on Packagist Total Downloads

Tired of repeating the status control of your models again and again? Well, here it's already done.

Installation

You can install the package via composer:

composer require omatech/laravel-statusable

Setup

php artisan vendor:publish --tag=laravel-statusable-publish

Usage

Just use Statusable trait in your models to obtain the current status or the status history.

use Omatech\LaravelStatusable\App\Traits\Statusable;

To add an entry to history use the add method from StatusHistory model. Example:

StatusHistory::add('status-name', 'model-instance', 'releated-model', 'guard');

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

About

Tired of repeating the status control of your models again and again? Well, here it's already done.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages