Laravel

Livewire Progress Indicators

January 16, 2026 1 min read 27 views

Progress indicators:

Simple Progress Bar

public int $progress = 0;

public function processItems()
{
    $items = Item::all();
    $total = $items->count();
    
    foreach ($items as $index => $item) {
        $item->process();
        $this->progress = (($index + 1) / $total) * 100;
    }
}

View

{{ $progress }}%

With Steps

public int $currentStep = 1;
public int $totalSteps = 5;
Share this post:

Related Posts

Comments (0)

Please log in to leave a comment. Log in

No comments yet. Be the first to comment!