Artisan Commands
The starter includes several custom Artisan commands for managing your application’s database, configuration, and Northwestern integrations.
Database Commands
Section titled “Database Commands”db:rebuild
Section titled “db:rebuild”Completely rebuild the database by dropping all tables, running migrations, and executing all auto-discovered seeders.
php artisan db:rebuildWhat it does:
- Drops all tables, views, and types
- Runs all migrations
- Executes all seeders marked with
#[AutoSeed]attribute - Regenerates IDE helper files
When to use:
- Initial project setup
- After pulling schema changes from git
- When switching between feature branches with different schemas
- Resetting test data during development
Related: db:wipe, migrate:fresh, db:seed
db:seed:list
Section titled “db:seed:list”Display all auto-discovered seeders with their dependencies and execution order.
php artisan db:seed:listOutput example:
┌───┬──────────────────┬──────────────────────────────────┐ │ # │ Seeder │ Dependencies │ ├───┼──────────────────┼──────────────────────────────────┤ │ 1 │ PermissionSeeder │ none │ │ 2 │ RoleTypeSeeder │ none │ │ 3 │ RoleSeeder │ RoleTypeSeeder, PermissionSeeder │ └───┴──────────────────┴──────────────────────────────────┘When to use:
- Verify seeder discovery and dependencies
- Troubleshoot seeding order issues
- Document available seeders for your team
See also: Idempotent Seeding documentation
db:snapshot:create {name}
Section titled “db:snapshot:create {name}”Create a snapshot of the current database state.
php artisan db:snapshot:create my-snapshot-nameOptions:
{name}- (optional) Descriptive name for the snapshot. Defaults todatabase-dumpif omitted.--skip-schema-validation- Skip schema validation checks
What it does:
- Validates database schema matches current migrations (unless skipped)
- Dumps database to
database/snapshots/{name}.sql - Stores metadata about the snapshot (checksum, timestamp, migration/seeder counts)
When to use:
- Before making risky database changes
- Saving a known-good state for testing
- Creating test data fixtures
- Preserving demo data
See also: Database Snapshots documentation
db:snapshot:restore {name}
Section titled “db:snapshot:restore {name}”Restore a previously created database snapshot.
php artisan db:snapshot:restore my-snapshot-nameOptions:
{name}- (optional) Name of the snapshot to restore. Defaults todatabase-dumpif omitted.--skip-schema-validation- Skip schema validation checks--backup- Create a backup of the current database before restoring
What it does:
- Validates snapshot exists
- Checks schema compatibility (unless skipped)
- Creates a backup if requested
- Drops all current database tables
- Restores data from snapshot SQL file
When to use:
- Resetting to a known state during testing
- Recovering from bad data changes during development
- Switching between test scenarios
db:snapshot:list
Section titled “db:snapshot:list”List all available database snapshots.
php artisan db:snapshot:listdb:snapshot:info {name}
Section titled “db:snapshot:info {name}”Display detailed information about a specific snapshot.
php artisan db:snapshot:info my-snapshot-nameOptions:
{name}- (optional) Name of the snapshot to inspect. If omitted, an interactive selector is shown.
What it does:
- Displays file information (path, size, modification date)
- Shows schema metadata (checksum, migration/seeder counts)
- Compares snapshot schema with current codebase
When to use:
- Verifying a snapshot’s contents before restoring
- Checking if a snapshot is compatible with current code
- Reviewing snapshot metadata
db:snapshot:delete {name}
Section titled “db:snapshot:delete {name}”Delete a database snapshot and its associated metadata.
php artisan db:snapshot:delete my-snapshot-nameOptions:
{name}- (optional) Name of the snapshot to delete. If omitted, an interactive selector is shown.--all- Delete all snapshots
What it does:
- Removes the SQL snapshot file from
database/snapshots/ - Cleans up associated metadata from the checksum map
When to use:
- Removing old or unused snapshots
- Freeing up disk space
- Cleaning up after testing
db:wake
Section titled “db:wake”Wake up a potentially-inactive serverless RDS database by establishing a connection.
php artisan db:wakeWhat it does:
Attempts to connect to the database and execute a simple query, causing serverless databases (like AWS Aurora Serverless) to wake from sleep mode.
When to use:
- Before running migrations
- As part of deployment scripts
- When you know the database has been idle
Configuration Commands
Section titled “Configuration Commands”config:validate
Section titled “config:validate”Validate application configuration and environment variables.
php artisan config:validateWhat it does:
Runs all auto-discovered config validators and reports their status. Built-in validators check:
- Application key
- SSO credentials (Entra ID or Online Passport)
- Directory Search API key
- Database connectivity
- Queue connection
- S3 storage access
- EventHub credentials (when not mocked)
Validators that aren’t relevant to the current configuration (e.g., EventHub when mocked) are automatically skipped and shown separately in the output.
When to use:
- After initial installation
- After environment variable changes
- Before deployment
- Troubleshooting integration issues
Adding Custom Validators
Section titled “Adding Custom Validators”Validators are discovered automatically using the #[StarterValidator] attribute, following the same pattern as #[AutoSeed] for seeders.
1. Create a validator class implementing ConfigValidator in a Services/ConfigValidation directory within your domain:
<?php
namespace App\Domains\Billing\Services\ConfigValidation;
use App\Domains\Core\Attributes\StarterValidator;use App\Domains\Core\Contracts\ConfigValidator;
#[StarterValidator(description: 'Stripe')]class StripeValidator implements ConfigValidator{ public function shouldRun(): bool { // Return false to skip when the integration isn't configured return filled(config('services.stripe.secret')); }
public function validate(): bool { return filled(config('services.stripe.secret')) && filled(config('services.stripe.key')); }
public function successMessage(): string { return 'Stripe API keys are configured'; }
public function errorMessage(): string { return 'Stripe configuration is incomplete'; }
public function hints(): array { return [ 'Set <comment>STRIPE_KEY</comment> and <comment>STRIPE_SECRET</comment> in your .env file', ]; }}2. That’s it. The validator is automatically discovered from any app/Domains/*/Services/ConfigValidation directory. No registration or configuration needed.
Maintenance Commands
Section titled “Maintenance Commands”access-tokens:notify-expiration
Section titled “access-tokens:notify-expiration”Send expiration reminder emails for access tokens approaching their expiration date.
php artisan access-tokens:notify-expirationWhat it does:
- Queries for active access tokens with upcoming expiration dates
- Checks which tokens are due for notifications (30, 14, 7, 3, 1 days before)
- Sends reminder emails to token owners
See also: API Documentation
Health Check Commands
Section titled “Health Check Commands”health:check
Section titled “health:check”Run health checks for all external integrations and services.
php artisan health:checkWhat it does:
Validates connectivity and configuration for:
- Database - Connection and query execution (production only)
- Queue - Queue worker connectivity
- Cache - Cache store read/write
- Schedule - Scheduler heartbeat
- Debug Mode - Ensures debug mode is off (non-local)
- Optimized App - Ensures app is optimized (non-local)
- Security Advisories - Checks for known package vulnerabilities
- Directory Search - API connectivity and test query
When to use:
- After deployment
- Troubleshooting integration issues
- Monitoring service connectivity
- As part of CI/CD pipelines
Integration:
The /api/health endpoint also runs these checks for automated monitoring:
curl https://your-app.northwestern.edu/api/healthStarter Commands
Section titled “Starter Commands”starter:check
Section titled “starter:check”Check for newer releases of the Northwestern Laravel Starter.
php artisan starter:checkWhat it does:
- Reads the current version from
.starter-version.yaml - Queries the GitHub Releases API for newer versions
- Displays release notes and a compare URL for any available updates
Options:
--version-file- Path to.starter-version.yaml(defaults to project root)
This command runs automatically via composer install and composer update in local environments. Results are cached for 4 hours to avoid unnecessary API calls.
Changelog Commands
Section titled “Changelog Commands”make:changelog
Section titled “make:changelog”Scaffold a new changelog Markdown file in resources/changelogs/.
php artisan make:changelogIn interactive mode, the command prompts for a slug, date, and title with sensible defaults. Arguments and options can also be passed directly:
php artisan make:changelog 2026-03-01 --date=2026-03-01 --title="Search Improvements"Options:
{slug}- (optional) URL-safe identifier. Defaults to today’s date.--date- Authored date inYYYY-MM-DDformat. Defaults to today.--title- Human-readable title. Defaults to “Month Year Release” when the slug is a date.
If a file with the same slug already exists, a numeric suffix is appended automatically.
See also: Changelog documentation
IDE Helper Commands
Section titled “IDE Helper Commands”The starter uses laravel-ide-helper to generate IDE autocomplete files. These commands are automatically run after db:rebuild:
ide-helper:generate
Section titled “ide-helper:generate”Generate IDE helper file for Laravel facades.
php artisan ide-helper:generateide-helper:models
Section titled “ide-helper:models”Generate PHPDoc annotations for Eloquent models.
php artisan ide-helper:models --write --resetide-helper:meta
Section titled “ide-helper:meta”Generate PhpStorm meta file for container bindings.
php artisan ide-helper:meta