toastr.blade.php 405 B

123456789
  1. @if(Session::has('dcat-admin-toastr'))
  2. @php
  3. $toastr = Session::get('dcat-admin-toastr');
  4. $type = $toastr->get('type')[0] ?? 'success';
  5. $message = $toastr->get('message')[0] ?? '';
  6. $options = admin_javascript_json($toastr->get('options', []));
  7. @endphp
  8. <script>$(function () { toastr.{{$type}}('{!! $message !!}', null, {!! $options !!}); })</script>
  9. @endif