@extends('layouts.app') @section('content') @php $currentSort = request('sort_column') ?: 'descricao'; $currentDirection = request('sort_direction', 'ASC'); $sortUrl = function($column) use ($currentSort, $currentDirection) { $direction = ($currentSort == $column && $currentDirection == 'ASC') ? 'DESC' : 'ASC'; $params = array_merge(request()->query(), ['sort_column' => $column, 'sort_direction' => $direction, 'page' => 1]); return request()->url() . '?' . http_build_query($params); }; $sortIndicator = function($column) use ($currentSort, $currentDirection) { if ($currentSort == $column) { return $currentDirection == 'DESC' ? '▼' : '▲'; } return ''; }; @endphp

Grupos

Os grupos definem limites de licenças e agregam clientes.

Limpar
@if($grupos->count() > 0) @foreach($grupos as $grupo) @endforeach @else @endif
ID @if($currentSort == 'id') {{ $sortIndicator('id') }} @endif Descrição @if($currentSort == 'descricao') {{ $sortIndicator('descricao') }} @endif Volumes @if($currentSort == 'volumes') {{ $sortIndicator('volumes') }} @endif No. Usuario @if($currentSort == 'clientes_count') {{ $sortIndicator('clientes_count') }} @endif Status @if($currentSort == 'ativo') {{ $sortIndicator('ativo') }} @endif Ações
{{ $grupo->id }} {{ $grupo->descricao }} {{ $grupo->volumes ?? '-' }} {{ $grupo->clientes_count ?? 0 }} @php $ativo = $grupo->ativo == 1; $classe = $ativo ? 'status-tag active' : 'status-tag inactive'; $texto = $ativo ? 'Ativo' : 'Inativo'; @endphp {{ $texto }}
Nenhum grupo encontrado.
{{ $grupos->links('vendor.pagination.custom') }} @endsection