Skip to content

Resolution Command

Run the finding’s correction logic for one recorded occurrence.

Terminal window
php artisan health:resolve 1

The required id is the FindingRecord ID in data_health_findings, rather than the related model ID or a finding key. The command runs synchronously and does not open a selector.

The stored key must resolve to a registered finding, its affected model must be loadable, and the finding must implement DataHealth\Contracts\CanResolve.

The manager reconstructs the finding with the stored model and context, calls resolve(), and evaluates the return value:

Return value Evaluation
Boolean Used directly.
Callable Invoked through Laravel’s container and must return a boolean.
Handler class name Resolved through the container; must implement DataHealth\Contracts\Resolver and return a boolean.

Resolution should return true only when the correction succeeded or its desired postcondition already holds. A final true marks the record resolved. A final false leaves its status unchanged.

The ID command is not restricted to active records. It evaluates the finding for the supplied record’s current model and context.

To update only the record status, use s in the record browser. The health:resolve command always executes resolution logic.

Outcome Output for ID 1 Status update Exit code
true Finding record 1 resolved. Becomes resolved. 0
false Finding record 1 could not be resolved. No update by the manager. 1
Missing record Finding record 1 was not found. No update. 1
Unsupported action or exception The exception message. No success status update. 1

The package does not wrap application-side changes and the record-status update in a transaction. If an action throws after changing application data, the command reports the error and does not undo those changes.

Terminal window
php artisan health:records

In a terminal, check records with Space and press r. With nothing checked, that key acts on the highlighted row. The browser continues after failures and refreshes the list after each batch. Fallback environments provide a Resolve records menu.

See Record Browser for selection and the resolution guide for implementing the action.