@extends('layouts.app')
@section('page_title', __('app.roles'))
@section('content')
<div class="top-card p-3"><div class="d-flex justify-content-between mb-3"><h5 class="fw-bold">{{ __('app.roles') }}</h5><a class="btn btn-success" href="{{ route('roles.create') }}"><i class="fa-solid fa-plus"></i> {{ __('app.add_role') }}</a></div><table class="table align-middle"><thead><tr><th>{{ __('app.name') }}</th><th>{{ __('app.role_code') }}</th><th>{{ __('app.users') }}</th><th>{{ __('app.status') }}</th><th>{{ __('app.action') }}</th></tr></thead><tbody>@foreach($roles as $role)<tr><td>{{ $role->name }}</td><td><code>{{ $role->code }}</code></td><td>{{ $role->users_count }}</td><td><span class="badge {{ $role->is_active?'bg-success':'bg-danger' }}">{{ $role->is_active?__('app.active'):__('app.inactive') }}</span></td><td><a class="btn btn-sm btn-light" href="{{ route('roles.edit',$role) }}"><i class="fa-solid fa-pen"></i></a></td></tr>@endforeach</tbody></table>{{ $roles->links() }}</div>
@endsection
