aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-11-07 13:05:29 +0100
committerMateja <mail@matejamaric.com>2020-11-07 13:05:29 +0100
commit5bdda7444013a0f9d87831daf29760a42ea29ee8 (patch)
treec93182af7168807c6ab7f82ffcedcfb0eeb162f3
parent3ff7e365c4aedbc47d642a07181cae45269a329d (diff)
downloadyota-laravel-5bdda7444013a0f9d87831daf29760a42ea29ee8.tar.gz
yota-laravel-5bdda7444013a0f9d87831daf29760a42ea29ee8.zip
fixed post editing
-rw-r--r--resources/views/pages/news.blade.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/resources/views/pages/news.blade.php b/resources/views/pages/news.blade.php
index 33ff039..8627510 100644
--- a/resources/views/pages/news.blade.php
+++ b/resources/views/pages/news.blade.php
@@ -16,10 +16,12 @@
<h6 class="card-subtitle mb-2 text-muted">Published at {{ $post->created_at->format('Y-m-d') }}@isset ($post->author) by {{$post->author }}@endisset</h4>
<div class="card-text">{!! $post->text !!}</div>
</div>
+ @auth
<div class="mt-3 card-footer">
<a href="{{ route('newsEdit', $post->id) }}" class="btn btn-warning">Edit</a>
<a href="{{ route('newsDelete', $post->id) }}" class="float-right btn btn-danger">Delete</a>
</div>
+ @endauth
</div>
@endforeach
{{ $news->links() }}