Skip to content

Commit

Permalink
Update User.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ConsoleTVs authored May 20, 2017
1 parent 4feb963 commit 3a9e49c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,14 @@ public function setPasswordAttribute($password)
{
$this->attributes['password'] = Hash::make($password);
}

/**
* Return if the user have access to laralum.
*
* @return bool
*/
public function laralumAccess()
{
return $this->hasPermission('laralum::access') || $this->superAdmin();
}
}

0 comments on commit 3a9e49c

Please sign in to comment.