Scenario
You’ve been asked to add anotes field to the Customer model so users can save internal notes about customers.
Step 1: Create a branch
Step 2: Find the relevant code
The Customer module lives inpackages/customer/. Use this mental model:
Step 3: Create a migration
Step 4: Update the model
Openpackages/customer/src/Models/Customer.php and add notes to $fillable:
Step 5: Update validation (FormRequest)
Find the create/update request inpackages/customer/src/Http/Requests/ and add the validation rule:
Step 6: Update the API response (Resource)
Find the resource inpackages/customer/src/Http/Resources/ and add the field:
Step 7: Test your change
Step 8: Check code style
Step 9: Commit and push
dev on GitLab.