Skip to content

Instantly share code, notes, and snippets.

@phreakin
Created May 12, 2023 08:10
Show Gist options
  • Save phreakin/ddf18a0262a31ffbe005b9746af03a63 to your computer and use it in GitHub Desktop.
Save phreakin/ddf18a0262a31ffbe005b9746af03a63 to your computer and use it in GitHub Desktop.
errors.blade.php
@if (isset($errors) && count($errors) > 0)
@foreach ($errors->all() as $error)
<div class="notification response-notification is-warning has-text-centered">
<span class="icon">{!! icon('alert-circle') !!}</span>
<span class="text">{{ $error }}</span>
</div>
@endforeach
@endif
@if (session()->has('error'))
<div class="notification response-notification is-warning has-text-centered">
<span class="icon">{!! icon('alert-circle') !!}</span>
<span class="text">{{ session()->get('error') }}</span>
</div>
@endif
@if (session()->has('success'))
<div class="notification response-notification is-success has-text-centered">
<span class="icon">{!! icon('info') !!}</span>
<span class="text">{{ session()->get('success') }}</span>
</div>
@endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment