This guide walks you through a realistic first task: adding a new field to an existing model. It covers the full flow you’ll use for any change.

Scenario

You’ve been asked to add a notes 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 in packages/customer/. Use this mental model:

Step 3: Create a migration

Edit the migration:
Run it:

Step 4: Update the model

Open packages/customer/src/Models/Customer.php and add notes to $fillable:

Step 5: Update validation (FormRequest)

Find the create/update request in packages/customer/src/Http/Requests/ and add the validation rule:

Step 6: Update the API response (Resource)

Find the resource in packages/customer/src/Http/Resources/ and add the field:

Step 7: Test your change

Step 8: Check code style

Step 9: Commit and push

Create a Merge Request to dev on GitLab.

The pattern

Every feature follows this pattern:

Common tasks cheatsheet