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