Since our Customer table can have thousands of entries - we need a way to filter them by something. In our case, we will create tabs to group them by their Pipeline Stage like this:

In this lesson, we will do the following:
- Dynamically create tabs for each Pipeline Stage
- Create a new tab called
Allto show all Customers - Add counters to each tab to show how many Customers are in each group
Let's get started!
Creating the Tabs
To make tabs, we will modify...
Thank you for the very useful tutorials. I have a question. How to control the visibility of a table column depending on the active tab?
I found a solution ->visible(fn ($livewire) => $livewire->activeTab !== 'all')
Get only the pipelines that have clients:
$pipelineStages = PipelineStage::whereHas('customers') ->orderBy('position') ->withCount('customers') ->get();