'integer', 'active' => 'boolean', ]; } /** In the order an operator thinks in, which is what `sort` is for. */ public function scopeUsable(Builder $query): Builder { return $query->where('active', true)->orderBy('sort')->orderBy('name'); } }