Skip to content

Explanation

Terminal window
php artisan health:explain 123

The argument is the ID of a persisted finding record. The command prints its class description (or key) followed by the structured explanation as formatted JSON. It requires the finding to implement DataHealth\Contracts\CanExplain. It runs without prompting and never invokes verification or resolution.

Success returns 0, including an explanation where still_applies is false. The record status remains unchanged. Missing records, unsupported explanations, unavailable models, and explanation failures return 1 with an error message.

Interactive health:records inspection also includes explanations, while keeping records inspectable when their explanation is unavailable. See Explaining Findings for the contract and the distinction between current facts and historical detection evidence.