v1.2.0 - You can now create and edit guides

This commit is contained in:
Anders
2020-09-11 12:30:37 +02:00
parent 78ab6be31a
commit cab8ad604c
10 changed files with 56 additions and 14 deletions
@@ -21,6 +21,7 @@
<table class="tbl">
<tr>
<th>Navn</th>
<th>Kategori</th>
@if(auth()->user()->can('guides.edit'))
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
@endif
@@ -31,6 +32,7 @@
@foreach($guides as $guide)
<tr>
<td>{{$guide->name}}</td>
<td>{{ \App\GuidesCategory::query()->where('id', '=', $guide->guide_category_id)->first()->guidesCategoryName }}</td>
@if(auth()->user()->can('guides.edit'))
<td><a href="{{ route("guides.edit", [ "guide" => $guide ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
@endif
@@ -63,11 +65,6 @@
@foreach(\App\GuidesCategory::query()->get() as $guideCategory)
<tr>
<td>{{$guideCategory->guidesCategoryName}}</td>
<!--
Code here :)
-->
</tr>
@endforeach
</table>