1.7 KiB
1.7 KiB
CLQMS Suggested Commands
Testing
# Run all tests
./vendor/bin/phpunit
# Run specific test file
./vendor/bin/phpunit tests/feature/Patients/PatientCreateTest.php
# Run specific test method
./vendor/bin/phpunit --filter testCreatePatientSuccess tests/feature/Patients/PatientCreateTest.php
# Run tests with coverage
./vendor/bin/phpunit --coverage-html build/logs/html
# Run tests by suite
./vendor/bin/phpunit --testsuite App
# Run via composer
composer test
Development Server
# Start PHP development server
php spark serve
# Or specify port
php spark serve --port 8080
Database
# Run migrations
php spark migrate
# Rollback migrations
php spark migrate:rollback
# Create new migration
php spark make:migration CreateUsersTable
# Run database seeds
php spark db:seed DBSeeder
php spark db:seed PatientSeeder
Code Generation (Scaffolding)
# Create controller
php spark make:controller Users
# Create model
php spark make:model UserModel
# Create migration
php spark make:migration CreateUsersTable
# Create seeder
php spark make:seeder UserSeeder
API Documentation
# After updating YAML files, regenerate bundled docs
node public/bundle-api-docs.js
# Produces: public/api-docs.bundled.yaml
Utilities (Windows)
# List files
dir
# Search in files (PowerShell)
Select-String -Path "app\*.php" -Pattern "PatientModel"
# Or using git bash (if available)
grep -r "PatientModel" app/
# Clear writable cache
del /q writable\cache\*
Git Commands
# Check status
git status
# Add files
git add .
# Commit (only when explicitly asked)
git commit -m "message"
# View recent commits
git log --oneline -10