Overview
NutriFit includes custom Artisan commands for automated tasks alongside standard Laravel commands for application management.Custom Commands
Send Appointment Reminders
Sends email reminders to patients and nutritionists for appointments scheduled for the next day.- Queries appointments scheduled for tomorrow
- Filters appointments with status
confirmada(confirmed) orpendiente(pending) - Sends email notifications to both the patient and assigned nutritionist
- Displays confirmation messages for each reminder sent
Standard Laravel Commands
Application Management
Clear Application Cache
Generate Application Key
Run Database Migrations
Seed Database
Cache Management
Cache Routes (Production)
route:clear.
Cache Configuration (Production)
config:clear.
Cache Views (Production)
view:clear.
Clear All Caches
Queue Management
Run Queue Worker
--daemon: Run worker in daemon mode--tries=3: Maximum number of attempts per job--timeout=60: Maximum seconds per job
Restart Queue Workers
View Failed Jobs
Retry Failed Jobs
Development Commands
Start Development Server
http://localhost:8000.
Interactive Shell (Tinker)
Run Scheduler (Testing)
Inspire Command
Production Optimization
Before deploying to production, run these commands:Custom Command Development
To create a new custom command:app/Console/Commands/.
Example Structure (from SendAppointmentReminders.php):
routes/console.php or add to the scheduler.
Troubleshooting
Permission Errors
If you encounter permission errors:Queue Not Processing
EnsureQUEUE_CONNECTION=database is set in .env and migrations have run:
Cache Issues
If changes aren’t reflecting:Related Documentation
Scheduled Tasks
Configure cron jobs and task scheduling
Database Backups
Backup and restoration procedures