Skip to content

Commit

Permalink
Merge pull request #2 from KKSzymanowski/master
Browse files Browse the repository at this point in the history
Change boot methods to match Eloquent boot[traitName] pattern.
  • Loading branch information
Mathius17 committed Jun 9, 2016
2 parents f76a357 + 38d9844 commit 87ac548
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cache/
/bootstrap/compiled.php
/vendor
composer.phar
composer.lock
.DS_Store
Thumbs.db

Expand Down
4 changes: 1 addition & 3 deletions src/Laratrust/Traits/LaratrustPermissionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ public function roles()
*
* @return void|bool
*/
public static function boot()
public static function bootLaratrustPermissionTrait()
{
parent::boot();

static::deleting(function ($permission) {
if (!method_exists(Config::get('laratrust.permission'), 'bootSoftDeletes')) {
$permission->roles()->sync([]);
Expand Down
4 changes: 1 addition & 3 deletions src/Laratrust/Traits/LaratrustRoleTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,8 @@ public function perms()
*
* @return void|bool
*/
public static function boot()
public static function bootLaratrustRoleTrait()
{
parent::boot();

$flushCache = function ($role) {
$role->flushCache();
return true;
Expand Down
4 changes: 1 addition & 3 deletions src/Laratrust/Traits/LaratrustUserTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ public function roles()
*
* @return void|bool
*/
public static function boot()
public static function bootLaratrustUserTrait()
{
parent::boot();

$flushCache = function ($user) {
$user->flushCache();
return true;
Expand Down

0 comments on commit 87ac548

Please sign in to comment.