Skip to content

Commit

Permalink
added timestamps to rolePermissions() relationship in Role model
Browse files Browse the repository at this point in the history
  • Loading branch information
Regulus343 committed Sep 14, 2018
1 parent 2f1d7cf commit 9dca420
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Identify.php
Expand Up @@ -6,8 +6,8 @@
and user states. Allows simple or complex user access control implementation.
created by Cody Jassman
v1.0.0
last updated on May 24, 2018
v1.0.1
last updated on September 13, 2018
----------------------------------------------------------------------------------------------------------*/

use Illuminate\Auth\SessionGuard;
Expand Down
1 change: 1 addition & 0 deletions src/Models/Role.php
Expand Up @@ -77,6 +77,7 @@ public function users()
public function rolePermissions()
{
return $this->belongsToMany('Regulus\Identify\Models\Permission', Auth::getTableName('role_permissions'))
->withTimestamps()
->orderBy('display_order')
->orderBy('name');
}
Expand Down
8 changes: 4 additions & 4 deletions src/Models/User.php
Expand Up @@ -131,9 +131,9 @@ public function __construct(array $attributes = [])
public function roles()
{
return $this->belongsToMany('Regulus\Identify\Models\Role', Auth::getTableName('user_roles'))
->withTimestamps()
->orderBy('display_order')
->orderBy('name')
->withTimestamps();
->orderBy('name');
}

/**
Expand All @@ -144,9 +144,9 @@ public function roles()
public function userPermissions()
{
return $this->belongsToMany('Regulus\Identify\Models\Permission', Auth::getTableName('user_permissions'))
->withTimestamps()
->orderBy('display_order')
->orderBy('name')
->withTimestamps();
->orderBy('name');
}

/**
Expand Down

0 comments on commit 9dca420

Please sign in to comment.