| title | User Module API Reference | |||
|---|---|---|---|---|
| type | reference | |||
| tags |
|
|||
| created | 2026-07-28 | |||
| updated | 2026-07-28 |
execute(string $email, string $password): boolValidates credentials and creates session. Returns true on success.
execute(): voidDestroys session and clears auth state.
execute(array $data): UserCreates new user. Data: email, password, name.
execute(User $user): boolSoft-deletes user. Returns true if successful.
$user = User::find($id);
$user->email;
$user->name;
$user->hasRole('admin');
$user->assignRole('editor');$team = Team::find($id);
$team->members(); // User collection
$team->owner; // User (belongs-to)Provides authenticationLogs() relation on User.
Provides teams() and currentTeam() methods (requires HasRoles).
Provides tenants() and currentTenant() methods (requires HasRoles).