Basic design created

This commit is contained in:
2026-02-03 09:33:18 +01:00
parent 3570f442f5
commit e280fcfba8
29 changed files with 1055 additions and 28 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Providers;
class AuthCheckProvider {
public function checkLoggedIn() : bool {
if (!auth()->check()) {
return false;
}
$user = auth()->user();
$tenant = app('tenant');
return $user->active && $tenant->slug === $user->tenant;
}
public function getUserRole() : ?string {
if (!$this->checkLoggedIn()) {
return null;
}
return auth()->user()->user_role;
}
}