Added @can('delete', $role).

This commit is contained in:
Leonid Nikitin 2023-08-01 22:09:39 +06:00
parent 9c1ed593b5
commit 941699f473
Signed by: kor-elf
GPG Key ID: 7DE8F80C5CEC2C0D

View File

@ -27,23 +27,23 @@
<td>{{ $role->code }}</td>
<td>
@if($role->is_remove)
<form method="post" action="{{ route('roles.destroy', $role) }}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger click-confirm">
{{ __('Delete') }}
</button>
</form>
@can('delete', $role)
<form method="post" action="{{ route('roles.destroy', $role) }}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-danger click-confirm">
{{ __('Delete') }}
</button>
</form>
@endcan
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="card-footer border-0 d-flex flex-column flex-lg-row align-items-center justify-content-between">
<nav aria-label="Пример навигации по странице">
{{ $roles->links() }}
</nav>
<div class="card-footer border-0">
{{ $roles->links() }}
</div>
</div>
</div>