Skip to main content

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.

Starting the dev server

A single command starts all three processes you need for development:
composer run dev
This uses concurrently to run the following in parallel:
ProcessCommandPurpose
serverphp artisan serveHTTP server on localhost:8000
queuephp artisan queue:listen --tries=1Processes queued jobs (emails, etc.)
vitenpm run devVite dev server with HMR on localhost:5173
Each process is colour-coded in the terminal output (blue, purple, orange) for easy identification.
Leave this command running in a dedicated terminal tab while you develop. Stop it with Ctrl+C.

Hot module replacement

Vite provides hot module replacement (HMR) for CSS and JavaScript. When you save a file in resources/css/ or resources/js/, the browser updates instantly without a full page reload. Blade template changes trigger an automatic full-page refresh.
For HMR to work, the Vite dev server must be running (npm run dev or composer run dev). If you only ran npm run build, you’ll need to rebuild manually after each change.

Tailing logs with Pail

Laravel Pail provides a pretty-printed, real-time log viewer in the terminal.
php artisan pail
Filter by log level:
php artisan pail --level=error
Filter by message content:
php artisan pail --filter="User"
Pail requires the ext-pcntl PHP extension, which is available on macOS and Linux. It is not supported on Windows without WSL.

Interactive REPL with Tinker

Laravel Tinker gives you a PHP REPL with full access to your application’s models, services, and helpers.
php artisan tinker
Example session:
# Fetch all users
>>> App\Models\User::all();

# Create a test user
>>> App\Models\User::factory()->create(['name' => 'Test User']);

# Check the latest user
>>> App\Models\User::latest()->first();

Code style with Pint

Laravel Pint is an opinionated PHP code style fixer based on PHP-CS-Fixer. Check for style violations (dry run):
./vendor/bin/pint --test
Fix all style violations:
./vendor/bin/pint
Fix a specific file or directory:
./vendor/bin/pint app/Models/User.php
./vendor/bin/pint app/Http/Controllers/
Run Pint before committing to keep the codebase consistent. You can add it as a pre-commit hook or integrate it into your editor.

Environment configuration

The .env file in the project root holds your local environment variables. It is never committed to version control. Key variables for local development:
.env
# Application
APP_NAME=Laravel
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost:8000

# Database (MySQL default, or SQLite for zero-config local dev)
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=stratus
DB_USERNAME=root
DB_PASSWORD=

# Mail (log driver writes to storage/logs/laravel.log — no real emails sent)
MAIL_MAILER=log

# Queue (database driver — requires queue:listen worker, started by composer run dev)
QUEUE_CONNECTION=database
For the simplest local setup, switch DB_CONNECTION=sqlite and remove the other DB_* lines — Laravel will use database/database.sqlite with no server required.
Never set APP_DEBUG=true in production. It exposes stack traces and application internals.

Database seeding

Seeders populate the database with development data. Run all seeders:
php artisan db:seed
Reset and re-seed the database from scratch:
php artisan migrate:fresh --seed

Using factories

Model factories let you generate realistic test data using Faker. The User model ships with UserFactory.
use App\Models\User;

// Create and persist one user (email is verified by default)
$user = User::factory()->create();

// Create a user with specific attributes
$user = User::factory()->create([
    'name' => 'Jane Doe',
    'email' => 'jane@example.com',
]);

// Create an unverified user (email_verified_at = null)
$user = User::factory()->unverified()->create();

// Create 10 users without persisting (useful for testing)
$users = User::factory()->count(10)->make();

// Create and persist 10 users
$users = User::factory()->count(10)->create();
The default password for factory-created users is 'password' (stored as a bcrypt hash). Factories are defined in database/factories/. See Models for the User model’s factory details.

Build docs developers (and LLMs) love