55 lines
2.8 KiB
PHP
55 lines
2.8 KiB
PHP
<x-app-layout>
|
|
<x-slot name="header">
|
|
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
|
|
{{ __('Role Management') }}
|
|
</h2>
|
|
</x-slot>
|
|
|
|
<div class="py-12">
|
|
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
|
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm sm:rounded-lg p-6">
|
|
@if(session('message'))
|
|
<x-bladewind::alert type="{{ session('type') }}">{{ session('message') }}</x-bladewind::alert>
|
|
@endif
|
|
|
|
<div class="mb-4 flex justify-between">
|
|
<h2 class="text-lg font-semibold">{{__('Role List')}}</h2>
|
|
@can('role-create')
|
|
<x-bladewind.button tag="a" href="{{ route('roles.create') }}" color="green" icon="plus-small" >{{__('Create New Role')}}</x-bladewind.button>
|
|
@endcan
|
|
</div>
|
|
<x-bladewind.table divider="thin" has_shadow="true" celled="true">
|
|
<x-slot name="header">
|
|
<th>{{__('No')}}</th>
|
|
<th>{{__('Name')}}</th>
|
|
<th>{{__('Action')}}</th>
|
|
</x-slot>
|
|
@foreach ($roles as $key => $role)
|
|
<tr >
|
|
<td >{{ ++$i }}</td>
|
|
<td >{{ $role->name }}</td>
|
|
<td >
|
|
<x-bladewind.button tag="a" href="{{ route('roles.show',$role->id) }}" size="tiny" color="cyan" icon="list-bullet" >{{__('Show')}}</x-bladewind.button>
|
|
@can('role-edit')
|
|
<x-bladewind.button tag="a" href="{{ route('roles.edit',$role->id) }}" size="tiny" color="yellow" icon="pencil-square" >{{__('Edit')}}</x-bladewind.button>
|
|
@endcan
|
|
@can('role-delete')
|
|
<form method="POST" action="{{ route('roles.destroy', $role->id) }}" class="inline" onsubmit="return confirm('Are you sure?');">
|
|
@csrf
|
|
@method('DELETE')
|
|
<x-bladewind.button can_submit="true" size="tiny" color="red" icon="trash" >{{__('Delete')}}</x-bladewind.button>
|
|
</form>
|
|
@endcan
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</x-bladewind.table>
|
|
|
|
<div class="mt-4">
|
|
{!! $roles->links('pagination::tailwind') !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-app-layout>
|