This commit is contained in:
2026-03-15 16:38:35 -05:00
parent 943bdffa7c
commit 237e5b79a3
2 changed files with 17 additions and 1 deletions
+16
View File
@@ -52,4 +52,20 @@ class User extends Authenticatable
{
$this->increment('privileges_version');
}
public function getName() {
return $this->character_name;
}
public function getId() {
return $this->character_id;
}
public function getRole() {
$role = UserRole::where([
'character_id' => $this->character_id,
])->first();
return $role->role;
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ Route::middleware('auth')->group(function () {
Route::get('/dashboard/guest', [DashboardController::class, 'displayGuest'])->name('dashboard.guest')->withoutMiddleware(RequireRole::class)
->withoutMiddleware(RequirePermission::class);
} else {
Route::get('/dashboard', [DashboardController::class, 'displayUser'])->name('dashboard');
Route::get('/dashboard/user', [DashboardController::class, 'displayUser'])->name('dashboard');
}