add admin gate

This commit is contained in:
TimmensOne
2023-03-31 17:17:09 +02:00
parent 7a95a3d36f
commit 8b7ae81d66
11 changed files with 80 additions and 86 deletions

View File

@@ -3,10 +3,12 @@
<li>room_code: {{ $location->room_code }}</li>
<li>timestamp_located_since: {{ $location->timestamp_located_since }}</li>
</ul>
<button><a href="locations/{{ $location->location_transaction_id }}/edit">Edit</a></button>
<form method="POST" action="locations/{{ $location->location_transaction_id }}">
@method('DELETE')
@csrf
<button>Delete</button>
</form>
@can('admin-only')
<button><a href="locations/{{ $location->location_transaction_id }}/edit">Edit</a></button>
<form method="POST" action="locations/{{ $location->location_transaction_id }}">
@method('DELETE')
@csrf
<button>Delete</button>
</form>
@endcan
</div>