Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlap committed Feb 12, 2017
1 parent d8dec72 commit af32ffa
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,48 @@ Via Composer
$ composer require victorlap/laravel-approvable
```

Next, you must install the service provider:

```php
// config/app.php
'providers' => [
...
Victorlap\Approvable\ApprovableServiceProvider::class,
];
```

You can publish the migration with:
```bash
php artisan vendor:publish --provider="Victorlap\Approvable\ApprovableServiceProvider" --tag="migrations"
```

*Note*: The default migration assumes you are using integers for your model IDs. If you are using UUIDs, or some other format, adjust the format of the approvable_id and user_id fields in the published migration before continuing.

After the migration has been published you can create the `approvals` table by running the migrations:


```bash
php artisan migrate
```

## Usage

``` php
$skeleton = new Victorlap\Approvable();
echo $skeleton->echoPhrase('Hello, League!');
1. Add the trait to your eloquent model.
2. (Optional) Specify the `approveOf` or `dontApproveOf` array to skip certain fields.

## Example
```php
use Illuminate\Database\Eloquent\Model;
use Victorlap\Approvable\Approvable;

class User extends Model
{
use Aprrovable;

protected $approveOf = array();

protected $dontApproveOf = array();
}
```

## Change log
Expand Down

0 comments on commit af32ffa

Please sign in to comment.