|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/leadai/leadai.co.in/resources/views/superadmin/roles/ |
Upload File : |
@extends('superadmin.layout')
@section('content')
<!-- begin::main content -->
<main class="main-content">
<div class="container">
<!-- begin::page header -->
<div class="page-header">
<h3>Roles</h3>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page">Roles List</li>
</ol>
</nav>
</div>
<!-- end::page header -->
<div class="card">
<?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('add-role')){ ?>
<div class="card-header">
<a href="{{ asset('superadmin/add-role') }}" class="btn btn-primary text-white">Add Roles</a>
</div>
<?php } ?>
<div class="card-body">
<table id="example1" class="table table-striped table-bordered">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Slug</th>
<?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('view-role-permission')){ ?>
<th>Permission</th>
<?php } ?>
<th>Action</th>
</tr>
</thead>
<tbody>
@if (!empty($roles))
@foreach ($roles as $role)
<tr>
<td>{{ $role->id }}</td>
<td>{{ $role->name }}</td>
<td>{{ $role->slug }}</td>
<?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('view-role-permission')){ ?>
<td>
<a href="{{ asset('superadmin/permission/' . $role->id) }}">
<i class="fa fa-plus"></i>
</a>
</td>
<?php } ?>
<td>
<?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('edit-role')){ ?>
<a href="{{ asset('superadmin/edit-role/' . $role->id) }}">
<i class="fa fa-edit text-success fa-lg"></i>
</a>
<?php } ?>
<?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('delete-role')){ ?>
<a class="delete-confirm"
href="{{ asset('superadmin/delete-role/' . $role->id) }}">
<i class="fa fa-trash text-danger fa-lg"></i>
</a>
<?php } ?>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
</main>
<!-- end::main content -->
@endsection
@push('footer-script')
<!-- begin::dataTable -->
<script src="{{ asset('public/admin/vendors/dataTable/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('public/admin/vendors/dataTable/dataTables.bootstrap4.min.js') }}"></script>
<script src="{{ asset('public/admin/vendors/dataTable/dataTables.responsive.min.js') }}"></script>
<script src="{{ asset('public/admin/js/examples/datatable.js') }}"></script>
<!-- end::dataTable -->
@endpush