SHARE
TWEET

Untitled

a guest Sep 20th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @if($message = Session::get('success'))
  2. <script type="text/javascript">
  3.   $(function() {
  4.     const Toast = Swal.mixin({
  5.       toast: true,
  6.       position: 'top-end',
  7.       showConfirmButton: false,
  8.       timer: 5000
  9.     });
  10.    
  11.     Toast.fire({
  12.       type: 'success',
  13.       title: 'Sukses!&nbsp;{{ $message }}'
  14.     })
  15.  
  16.   });
  17. </script>
  18. @elseif($message = Session::get('info'))
  19. <script type="text/javascript">
  20.   $(function() {
  21.     const Toast = Swal.mixin({
  22.       toast: true,
  23.       position: 'top-end',
  24.       showConfirmButton: false,
  25.       timer: 5000
  26.     });
  27.    
  28.     Toast.fire({
  29.       type: 'info',
  30.       title: 'Sukses!&nbsp;{{ $message }}'
  31.     })
  32.  
  33.   });
  34. </script>
  35. @elseif($message = Session::get('warning'))
  36. <script type="text/javascript">
  37.   $(function() {
  38.     const Toast = Swal.mixin({
  39.       toast: true,
  40.       position: 'top-end',
  41.       showConfirmButton: false,
  42.       timer: 5000
  43.     });
  44.    
  45.     Toast.fire({
  46.       type: 'warning',
  47.       title: 'Sukses!&nbsp;{{ $message }}'
  48.     })
  49.  
  50.   });
  51. </script>
  52. @elseif($message = Session::get('error'))
  53. <script type="text/javascript">
  54.   $(function() {
  55.     const Toast = Swal.mixin({
  56.       toast: true,
  57.       position: 'top-end',
  58.       showConfirmButton: false,
  59.       timer: 5000
  60.     });
  61.    
  62.     Toast.fire({
  63.       type: 'error',
  64.       title: 'Gagal!&nbsp;{{ $message }}'
  65.     })
  66.  
  67.   });
  68. </script>
  69. @elseif($message = Session::get('not_found'))
  70. <script type="text/javascript">
  71.   $(function() {
  72.     const Toast = Swal.mixin({
  73.       toast: true,
  74.       position: 'top-end',
  75.       showConfirmButton: false,
  76.       timer: 5000
  77.     });
  78.    
  79.     Toast.fire({
  80.       type: 'question',
  81.       title: 'Maaf!&nbsp;{{ $message }}'
  82.     })
  83.  
  84.   });
  85. </script>
  86. @else
  87. @endif
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top