From an Eloquent model to a working customer panel
A customer calls and says, “It’s Juniper, about the new account.” Your sales rep finds two matches. Juniper Bikes is still a prospect. Juniper Parts has paused its account. The rep needs enough information to pick the right company while the caller is still on the line. A list of names and an Edit button only gets them halfway.
Design the list around the phone call
Start with a Laravel Customer model backed by name, email, status and notes columns. In SeviaFlow, the model keeps its usual job of reading and writing customer records. CustomerResource::table() defines what the operator sees when opening the directory. Make the name searchable, display the status alongside it, and give the rep a status filter.
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name')->searchable()->sortable(),
TextColumn::make('email')->searchable(),
StatusColumn::make('status')->options(self::statusOptions()),
])
->filters([
SelectFilter::make('status')->options(self::statusOptions()),
]);
}
Here statusOptions() is a helper on the resource. It maps stored values such as prospect, active and paused to the labels a rep sees. Use that same map for the status select in form(). If the team renames “Paused” to “On hold”, the list, edit form and filter can all pick up the new wording while existing records keep their stored value. The walkthrough includes the complete class and its imports. Build the customer directory
Give the rep somewhere to put the answer
The index needs a status at a glance. The edit screen needs a place to write “Ask for Jo when calling about the first delivery.” Add TextareaField::make('notes') to the form and leave notes out of the table columns. SeviaFlow UI uses the form for create and edit, so a rep can record that detail when opening an account or after a later call.
Register CustomerResource under the customers slug, configure the panel gate and give the test operator permission to create and update customers. With the UI adapter and its default prefix, the directory is at /admin/resources/customers. Register a resource
Try it with two Junipers
In a local directory, create Juniper Bikes as a prospect and Juniper Parts as paused. Search for Juniper, filter to Prospect, then open Juniper Bikes. Change its status to Active and add the delivery note. Go back to the directory and apply the same search and filter. Bikes should disappear from Prospect and reappear under Active, with the note waiting on its detail page. That small test follows a customer through the whole call.