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>{{ $role->code }}</td>
<td> <td>
@if($role->is_remove) @if($role->is_remove)
<form method="post" action="{{ route('roles.destroy', $role) }}"> @can('delete', $role)
@csrf <form method="post" action="{{ route('roles.destroy', $role) }}">
@method('DELETE') @csrf
<button type="submit" class="btn btn-danger click-confirm"> @method('DELETE')
{{ __('Delete') }} <button type="submit" class="btn btn-danger click-confirm">
</button> {{ __('Delete') }}
</form> </button>
</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>