More improvements to User Switch

This commit is contained in:
Deon George
2018-07-17 13:27:25 +10:00
parent ac867a2526
commit 55cbe4087c
3 changed files with 10 additions and 5 deletions

View File

@@ -9,7 +9,12 @@ use Session;
trait UserSwitch
{
public function switched()
public function GetIsAdminAttribute()
{
return isset($this->admin) ? $this->admin : FALSE;
}
public function getSwitchedAttribute()
{
return Session::get('orig_user');
}