›
›
›
  1. docs
  2. ›
  3. byrcsc/laravel-checklist
1.x
Browse documentationOpenClose

Getting started

  • Introduction
  • Installation and setup
  • Quick start

Core concepts

  • Templates and versions
  • Items and sections
  • Checklist lifecycle
  • Answers and evidence
  • Conditional rules
  • Scoring
  • Recurring schedules
  • Audit history

Operations

  • Author a template
  • Run a checklist
  • Create a schedule
  • Customize notifications
  • Export and report
  • Verify audit history
  • Composing with sibling packages

Reference

  • Configuration
  • Builder API
  • Models and scopes
  • Events and notifications
  • Console commands
  • Enums and contracts
  • Testing
  • Troubleshooting

Getting started

  • Introduction
  • Installation and setup
  • Quick start

Core concepts

  • Templates and versions
  • Items and sections
  • Checklist lifecycle
  • Answers and evidence
  • Conditional rules
  • Scoring
  • Recurring schedules
  • Audit history

Operations

  • Author a template
  • Run a checklist
  • Create a schedule
  • Customize notifications
  • Export and report
  • Verify audit history
  • Composing with sibling packages

Reference

  • Configuration
  • Builder API
  • Models and scopes
  • Events and notifications
  • Console commands
  • Enums and contracts
  • Testing
  • Troubleshooting

byrcsc/laravel-checklist · 1.x

Verify audit history.

Check one or every checklist action chain and alert when stored history no longer matches its hashes.

checklist:verify recalculates one or every checklist action chain. Run it before trusting an export and on a recurring operations schedule; it exits with failure when any chain is broken.

1. Verify every checklist

php artisan checklist:verify

Successful output names the number of checked chains:

All 42 checklist(s) verified: every audit chain is intact.

With no checklists, the command warns and exits successfully. There is no history to reject.

2. Verify one checklist

php artisan checklist:verify --checklist=42

A missing identifier exits with failure rather than reporting a false green:

No checklist matched --checklist; nothing was verified.

Add -v to print a success line for every intact checklist.

3. Schedule verification

use Illuminate\Support\Facades\Schedule;

Schedule::command('checklist:verify')
    ->daily()
    ->onFailure(function (): void {
        // Notify your application's operations channel.
    });

Choose a cadence that matches how quickly your application must detect direct database changes. Verification streams each checklist's action rows, so total work grows with retained history.

4. Verify before an export

ChecklistExport::for() already verifies the selected checklist and includes the result under chain. To reject a broken export instead of rendering its status, check directly:

use ByRcsc\LaravelChecklist\Audit\ChainVerifier;

$verification = ChainVerifier::verify($checklist);

if (! $verification->intact) {
    throw new RuntimeException($verification->describe());
}

$export = $checklist->toExport();

5. Investigate the reported position

Failure output names the checklist, action row or chain end, position, and reason. Preserve the database before attempting repair. Updating action rows through Eloquent throws, and recomputing history would erase the evidence that it changed.

The package detects chain inconsistency but does not provide a repair command. Recovery policy depends on your application's audit and backup requirements.

What to read next

  • Audit history to understand what each hash covers.
  • Console commands for exact options and exit behavior.
  • Troubleshooting for common verification failures.
PreviousExport and reportNextComposing with sibling packages
View source

On this page

  1. 1. Verify every checklist
  2. 2. Verify one checklist
  3. 3. Schedule verification
  4. 4. Verify before an export
  5. 5. Investigate the reported position
  6. What to read next