Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AlexanderDamont1/Stratus/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Stratus POS uses Laravel Eloquent for database interaction. Models live inapp/Models/ and each maps to a database table.
User
File:app/Models/User.php
The User model is the foundation of all authentication and user identity in Stratus. It extends Laravel’s Authenticatable base class, which provides everything needed to integrate with the authentication system.
app/Models/User.php
Traits
| Trait | Purpose |
|---|---|
HasFactory | Enables User::factory() for generating test and seed data |
Notifiable | Allows sending notifications (email, SMS, etc.) to the user |
Fillable attributes
These attributes can be mass-assigned viaUser::create() or $user->fill():
| Attribute | Type | Notes |
|---|---|---|
name | string | Display name |
email | string | Unique email address |
password | string | Automatically hashed (see casts) |
Hidden attributes
These attributes are excluded from array/JSON serialization:password— never exposed in API responses or logsremember_token— used for “remember me” sessions
Casts
| Attribute | Cast | Effect |
|---|---|---|
email_verified_at | datetime | Returns a Carbon instance instead of a raw string |
password | hashed | Automatically bcrypt-hashes the value on assignment |
Because
password is cast to hashed, you can assign a plain-text password directly — Laravel will hash it automatically:Database schema
users table
Created bydatabase/migrations/0001_01_01_000000_create_users_table.php:
| Column | Type | Notes |
|---|---|---|
id | bigint unsigned | Primary key, auto-increment |
name | varchar | Display name |
email | varchar | Unique |
email_verified_at | timestamp | Nullable — null if not yet verified |
password | varchar | Bcrypt hash |
remember_token | varchar(100) | Nullable |
created_at | timestamp | Auto-managed by Eloquent |
updated_at | timestamp | Auto-managed by Eloquent |
password_reset_tokens table
| Column | Type | Notes |
|---|---|---|
email | varchar | Primary key |
token | varchar | Hashed reset token |
created_at | timestamp | Nullable |
sessions table
| Column | Type | Notes |
|---|---|---|
id | varchar | Primary key |
user_id | bigint unsigned | Nullable, foreign key to users |
ip_address | varchar(45) | Nullable |
user_agent | text | Nullable |
payload | longtext | Session data |
last_activity | integer | Unix timestamp |
UserFactory
Class:Database\Factories\UserFactory
The factory generates User instances with realistic fake data for use in tests and seeders.
'password' (hashed with Hash::make()). Use this in tests:
Extending the User model
As Stratus grows to support POS-specific features, extend theUser model by adding new attributes and relationships.
Adding POS-specific attributes
Add new columns via a migration, then add them to$fillable:
app/Models/User.php
Adding relationships
app/Models/User.php