user side of contracts

This commit is contained in:
2019-04-26 02:51:23 -05:00
parent b367e2a166
commit 791681034c
9 changed files with 165 additions and 26 deletions

View File

@@ -37,17 +37,6 @@ class User extends Authenticatable
protected $table = 'users';
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
protected $guarded = [];
public function getUserType() {
return User::where('user_type')->get();
}
@@ -79,10 +68,6 @@ class User extends Authenticatable
return false;
}
public function tickets() {
return $this->hasMany('App\Models\HelpDesk\HelpDeskTicket', 'character_id');
}
public function hasEsiScope($scope) {
$found = EsiScope::where(['character_id' => $this->character_id, 'scope' => $scope])->get(['scope']);
if(isset($found[0]->scope) && $found[0]->scope == $scope) {
@@ -117,4 +102,12 @@ class User extends Authenticatable
return false;
}
}
public function getName() {
return $this->name;
}
public function getId() {
return $this->character_id;
}
}