2017 © Pedro Peláez
 

library approval

image

hkan/approval

  • Sunday, January 11, 2015
  • by hkan
  • Repository
  • 2 Watchers
  • 5 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Approval

Build status, (*1)

Content approval system for Laravel. Works just like Laravel's own soft deleting system., (*2)

Requirements

PHP >= 5.5, (*3)

Installation

Step 1: Add the following line to your composer.json's require array., (*4)

"hkan/approval": "dev-master"

Step 2: Add is_approved column to your desired models' tables (Recommended migration line), (*5)

$table->boolean('is_approved')->default(false);

Step 3: Copy the following line to the providers array of app/config/app.php, (*6)

'Hkan\Approval\ApprovalServiceProvider'

Step 4: Add the trait to your model(s)., (*7)

use \Hkan\Approval\Traits\ApprovalTrait;

Usage

Approve and unapprove posts

$post->approve()
$post->unapprove()

Approved and unapproved posts

Post::all() // Only approved posts
Post::onlyUnapproved()->get() // Only unapproved posts
Post::withUnapproved()->get() // Both approved and unapproved posts

Contribution

Issues, pull requests and feature requests are welcome., (*8)

The Versions

11/01 2015

dev-master

9999999-dev https://github.com/hkan/approval

  Sources   Download

The Requires

 

The Development Requires

by Hakan Aktas

laravel admin approval