{{-- The Broker Management module's status pill — docs/wireframes-v12/broker-management.html: Active Used two ways, and the model is what both hand over — the show page includes it directly, the listing reaches it through editColumn(): @include('brokers.partials.status', ['model' => $broker]) ->editColumn('status', 'brokers.partials.status') ## Why this is not That component is the shared one and its markup is exactly this, but it reads both its tone and its label from App\View\Components\StatusBadge's own closed list of canonical statuses — a vocabulary of project, unit and inquiry lifecycles that a broker's standing is not part of. A broker pill rendered through it would come out "unknown". So the module draws its own, on the same class names: `badge-{tone}` is the wireframe's colour (BrokerStatus::badgeClass(), read off the listing's three badges) and `status-{value}` is the identity hook — nothing styles it; it exists so a pill can be addressed by *what it is* rather than by the colour it came out as. Reached through BrokersDataTable's rawColumns(['status']), **so this output is injected into the page unescaped**. Nothing user-supplied can reach it, and the enum CAST is what makes that true rather than any check here: `status` is cast to BrokerStatus, so Eloquent resolves the column through `BackedEnum::from()` when the row is hydrated and a value outside the three cases raises a ValueError in the model — long before this partial runs. There is therefore no unknown-status branch to write, and one written here would be dead code claiming a fallback the runtime never reaches. The column is NOT NULL with a default, and every query that reaches this file selects it, so `$model->status` is always a BrokerStatus. Both the class and the label come off it, and both are values of a closed enum. yajra hands the row's model in as $model. --}} @php /** @var \App\Models\Broker $model */ $brokerStatus = $model->status; @endphp {{ $brokerStatus->label() }}