adamhut / approvable
A Simple package to put a approval or denial to model
Requires
- php: ^7.1
- illuminate/support: 5.7.*
Requires (Dev)
- orchestra/testbench: 3.7.*
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-12-19 03:39:13 UTC
README
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
Installation
You can install the package via composer:
composer require adamhut/approvable
Usage
php artisan vendor:publish --provider="Adamhut\Approvable\ApprovableServiceProvider" --tag="migrations" php artisan migrate
First, add the Adamhut\Approvable\Traits\Approvable trait to your User model(s):
use Illuminate\Foundation\Auth\User as Authenticatable; use Adamhut\Approvable\Traits\Approvable; class User extends Authenticatable { use Approvable; // ... } $user->isPending(); //true $user->isApproved() //false $user->isDenied(); //false $user->approve(); $user->isApproved() //true $user->isPending(); //false $user->isDenied(); //false $user->deny(); $user->isDenied() //true $user->isApproved() //false $user->isPending(); //false
Command
We alse provide a summery command
php artisan approval:summary
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 adamhut@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.