Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Typos and cleanup
  • Loading branch information
bbatsche committed Jan 13, 2015
1 parent c066520 commit d5b1df5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Entrust is a succinct and flexible way to add Role-based Permissions to **Laravel4**.

First and foremost I must give credit to the original developers of this package. Andrew Elkins (@andrewelkins) and Leroy Merlin (@zizaco) did excellent on the fundamental design and functionality. My fork is intended to:
First and foremost I must give credit to the original developers of this package. Andrew Elkins (@andrewelkins) and Leroy Merlin (@zizaco) did excellent work on the fundamental design and functionality. My fork is intended to:

- Remove extra components not really relevant to role & permission management (in particular, Ardent).
- Add extra functionality I felt was useful and particularly suited to this package.
Expand Down Expand Up @@ -182,8 +182,11 @@ $editUser->display_name = 'Edit Users'; // optional
$editUser->description = 'edit existing users'; // optional
$editUser->save();

$owner->perms()->sync(array($createPost->id, $editUser->id));
$admin->perms()->sync(array($createPost->id));
$admin->attachPermission($createPost);
// Equivalent to $admin->perms()->sync(array($createPost->id));

$owner->attachPermissions(array($createPost, $editUser));
// Equivalent to $owner->perms()->sync(array($createPost->id, $editUser->id));
```

#### Checking for Roles & Permissions
Expand Down

0 comments on commit d5b1df5

Please sign in to comment.