user roles model and database relationships

This commit is contained in:
2018-11-05 09:18:47 -06:00
parent d7e0143e0d
commit 99af5b41cf
2 changed files with 22 additions and 0 deletions
+4
View File
@@ -51,4 +51,8 @@ class User extends Authenticatable
public function getUserType() {
return User::where('user_type')->get();
}
public function roles() {
return $this->hasMany('App\UserRole');
}
}