New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

adamhut/approvable

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adamhut/approvable

A Simple package to put a approval or denial to model

Source
Packagist
Version
0.1.0
Version published
Total downloads
3
Maintainers
1
Created
Source

Simple flag a model as approve or deny

Latest Version on Packagist Build Status Quality Score Total Downloads

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.

Keywords

approvable

FAQs

Package last updated on 01 Mar 2019

Related posts