500.blade.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="container">
  4. <div class="error-page py-5 my-5">
  5. <div class="text-center">
  6. <h3 class="font-weight-bold">Something went wrong</h3>
  7. <p class="lead py-3">We cannot process your request at this time, please try again later. </p>
  8. <p class="mb-0">
  9. <a href="/" class="btn btn-primary font-weight-bold">Go back to timeline</a>
  10. </p>
  11. </div>
  12. @if($exception && $exception->getMessage())
  13. <hr>
  14. <p class="text-center small payload text-uppercase font-weight-bold text-primary cursor-pointer" data-payload="{{encrypt('exception_report:'.$exception->getMessage()) ?? ''}}">
  15. Copy diagnostic details
  16. </p>
  17. @endif
  18. </div>
  19. </div>
  20. @endsection
  21. @push('scripts')
  22. <script type="text/javascript">
  23. let payload = document.querySelector('.payload').getAttribute('data-payload');
  24. $('.payload').click(function(e) {
  25. try {
  26. App.util.clipboard(payload);
  27. swal(
  28. 'Copied',
  29. 'The error details have been copied. Please share this with the administrators to help fix this issue.',
  30. 'success'
  31. );
  32. } catch {
  33. swal(
  34. 'Diagnostic Details',
  35. payload,
  36. 'info'
  37. );
  38. }
  39. });
  40. </script>
  41. @endpush