<div class="sidebar-widget">
    <h4 class="sidebar-widget-title">Cat 1</h4>
    <ul class="nav nav-pills nav-stacked">
        <?php foreach($available_categories as $category): ?>
            <li <?php if(isset($_active_category) && $_active_category->id == $category->id): ?> class="active" <?php endif; ?> ><a href="<?php echo e(route('category.show', [$category->id, $category->slug])); ?>"><?php echo e($category->title); ?><?php if(config('template.show_counts')): ?> <span class="pull-right badge"><?php echo e($category->jobs()->where('active', true)->count()); ?></span><?php endif; ?></a></li>
        <?php endforeach; ?>
    </ul>
</div>