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 194daf5 commit 3f1c2d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/resources/views/public/_json-ld.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"image": [
"{{ $event->present()->image() }}"
],
@isset($event->url)
@empty(!$event->url)
"url": "{{ $event->url }}",
@endisset
@endempty
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ $event->uri() }}"
Expand Down
8 changes: 4 additions & 4 deletions src/resources/views/public/_list-item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<span class="event-list-item-venue">{{ $event->venue }}</span>
<div class="event-list-item-address">{!! nl2br($event->address) !!}</div>
</div>
@isset($event->summary)
@empty(!$event->summary)
<div class="event-list-item-summary">{{ $event->summary }}</div>
@endisset
@isset($event->url)
@endempty
@empty(!$event->url)
<div class="event-list-item-url"><a href="{{ $event->url }}" target="_blank" rel="noopener noreferrer">{{ parse_url($event->url, PHP_URL_HOST) }}</a></div>
@endisset
@endempty
</div>
</a>
</li>
16 changes: 8 additions & 8 deletions src/resources/views/public/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
<span class="event-venue">{{ $model->venue }}</span>
<div class="event-address">{!! nl2br($model->address) !!}</div>
</div>
@isset($model->summary)
@empty(!$model->summary)
<p class="event-summary">{!! nl2br($model->summary) !!}</p>
@endisset
@isset($model->url)
@endempty
@empty(!$model->url)
<div class="event-url"><a href="{{ $model->url }}" target="_blank" rel="noopener noreferrer">{{ parse_url($model->url, PHP_URL_HOST) }}</a></div>
@endisset
@endempty
<a class="btn btn-light btn-xs" href="{{ route($lang.'::event-ics', $model->slug) }}">
<span class="fa fa-calendar"></span> @lang('db.Add to calendar')
</a>
@isset($model->body)
@empty(!$model->body)
<div class="event-body">{!! $model->present()->body !!}</div>
@endisset
@isset($model->image)
@endempty
@empty(!$model->image)
<img class="event-image" src="{!! $model->present()->image(null, 1000) !!}" alt="">
@endisset
@endempty
@include('files::public._documents')
@include('files::public._images')
</article>
Expand Down

0 comments on commit 3f1c2d0

Please sign in to comment.