fix bug in news when user is delete

This commit is contained in:
Mathieu Lagace
2020-07-31 17:36:46 -04:00
parent 8158f8a8aa
commit d8e36b8479
5 changed files with 5 additions and 5 deletions

View File

@@ -26,7 +26,7 @@
<div class="news-body-small">
{!! $new->body !!}
</div>
<span class="news-small">{{ \App\User::find($new->user_id)->fullname()}}, {{ $new->created_at }}</span>
<span class="news-small">@if(\App\User::find($new->user_id)){{ \App\User::find($new->user_id)->fullname()}},@endif {{ $new->created_at }}</span>
<div class="news-tags">
@if($new->tags != [])
@foreach($new->tags as $tag)