655 B
655 B
trigger
| trigger |
|---|
| always_on |
Rule: Running PHP Artisan Commands
❗ Important
Never execute php artisan commands directly on the host machine.
✅ Correct Approach
All Artisan commands must be executed inside the Docker container.
📦 Reason
The application environment (PHP version, extensions, dependencies) is fully configured inside the container. Running commands outside may cause:
- Version mismatches
- Missing dependencies
- Inconsistent behavior
🛠️ How to Execute
Use one of the following patterns depending on the setup:
Docker Compose
docker compose exec <app_service> php artisan <command>