Skip to content

Commit

Permalink
@empty in place of @Isset
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Feb 17, 2020
1 parent 9fdfd99 commit 07c9c62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/resources/views/public/_list-item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<div class="news-list-item-info">
<h2 class="news-list-item-title">{{ $news->title }}</h2>
<div class="news-list-item-date">{{ $news->present()->dateLocalized }}</div>
@isset($news->summary)
@empty(!$news->summary)
<div class="news-list-item-summary">{{ $news->summary }}</div>
@endisset
@endempty
</div>
</a>
</li>
12 changes: 6 additions & 6 deletions src/resources/views/public/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

<article class="news">
<h1 class="news-title">{{ $model->title }}</h1>
@isset($model->image)
@empty(!$model->image)
<img class="news-image" src="{!! $model->present()->image(null, 1000) !!}" alt="">
@endisset
@endempty
<div class="news-date">{{ $model->present()->dateLocalized }}</div>
@isset($model->summary)
@empty(!$model->summary)
<p class="news-summary">{!! nl2br($model->summary) !!}</p>
@endisset
@isset($model->body)
@endempty
@empty(!$model->body)
<div class="news-body">{!! $model->present()->body !!}</div>
@endisset
@endempty
@include('files::public._documents')
@include('files::public._images')
</article>
Expand Down

0 comments on commit 07c9c62

Please sign in to comment.