Overview
Heimdinger.lol includes several custom Artisan commands for maintenance, deployment, and content management tasks. These commands are located inapp/Console/Commands/.
Available Commands
Sitemap Generation
Generates XML sitemaps for search engine optimization.Command Details
Command Details
File:
app/Console/Commands/GenerateSitemapCommand.phpSignature: sitemap:generateDescription: Generate XML sitemaps for all pagesWhat It Does
What It Does
The command collects URLs from multiple sources and generates sitemap files:
Collect Static Pages
Gathers all static routes (home, about, FAQ, etc.) with priority and change frequency:
app/Console/Commands/GenerateSitemapCommand.php:63
Collect Dynamic Content
Queries database for:
- All blog posts from Sheets
- All champions with slugs
- All skins with slugs
- All summoner icons with slugs
Configuration
Configuration
The base URL is configured via environment:Set in your
app/Console/Commands/GenerateSitemapCommand.php:29
.env:public/sitemap.xml accessible at https://yourdomain.com/sitemap.xml
Run this command after adding new champions, skins, or blog posts to update the sitemap.
Cloudflare Cache Purge
Purges the Cloudflare cache for the entire site.Command Details
Command Details
File:
app/Console/Commands/CloudflarePurgeCommand.phpSignature: cloudflare:purgeDescription: Purge the Cloudflare cacheHow It Works
How It Works
Makes an API request to Cloudflare to clear all cached content:
app/Console/Commands/CloudflarePurgeCommand.php:26
Configuration
Configuration
Requires Cloudflare credentials in Set in
config/cloudflare.php:config/cloudflare.php
.env:.env.example:34
- After deploying new content
- When updating static assets
- After changing CSS/JS files
- When skin/champion data updates
User Creation
Creates a new user account from the command line.Command Details
Command Details
File:
app/Console/Commands/UserCreateCommand.phpSignature: user:createDescription: Create a new user from CLIInteractive Prompts
Interactive Prompts
The command prompts for user information:
app/Console/Commands/UserCreateCommand.php:22
User Creation
User Creation
Creates the user with hashed password:
app/Console/Commands/UserCreateCommand.php:40
Admin users have access to Laravel Pulse monitoring and the streamer management panel.
Built-in Laravel Commands
In addition to custom commands, you’ll frequently use these Laravel commands:Database
Cache Management
Laravel Octane
Development
Scheduled Commands
While the application doesn’t currently define scheduled tasks inapp/Console/Kernel.php, you can schedule commands using Laravel’s task scheduler:
Creating Custom Commands
Generate a new command:Best Practices
Production Safety
Production Safety
Always add environment checks for destructive operations:
app/Console/Commands/UserCreateCommand.php:16
Logging
Logging
Log important command executions:
Exit Codes
Exit Codes
Return appropriate exit codes:
Next Steps
Deployment Guide
Learn how to deploy with Laravel Octane
Architecture
Understand the application structure