app.blade.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!doctype html>
  2. <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <!-- CSRF Token -->
  7. <meta name="csrf-token" content="{{ csrf_token() }}">
  8. <title>{{ config('app.name', 'Laravel') }}</title>
  9. <link rel="icon" href="{{\Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? \Illuminate\Support\Facades\Storage::disk('public')->url('favicon.ico') : asset('favicon.ico')}}" type="image/x-icon">
  10. <!-- Scripts -->
  11. <script src="{{ asset('js/app.js') }}" defer></script>
  12. <!-- Fonts -->
  13. <link rel="dns-prefetch" href="//fonts.gstatic.com">
  14. <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
  15. <link rel="stylesheet" href="{{asset('css/app.css')}}">
  16. <link rel="preload" href="{{asset('plugins/fontawesome-free/css/all.min.css')}}" as="style" onload="this.onload=null;this.rel='stylesheet'">
  17. <noscript><link rel="stylesheet" href="{{asset('plugins/fontawesome-free/css/all.min.css')}}"></noscript>
  18. {!! htmlScriptTagJsApi() !!}
  19. </head>
  20. @yield('content')
  21. <script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
  22. <script>
  23. @if(Session::has('error'))
  24. Swal.fire({
  25. icon: 'error',
  26. title: 'Oops...',
  27. html: '{{Session::get('error')}}',
  28. })
  29. @endif
  30. @if(Session::has('success'))
  31. Swal.fire({
  32. icon: 'success',
  33. title: '{{Session::get('success')}}',
  34. position: 'top-end',
  35. showConfirmButton: false,
  36. background : '#343a40',
  37. toast: true,
  38. timer: 3000,
  39. timerProgressBar: true,
  40. didOpen: (toast) => {
  41. toast.addEventListener('mouseenter', Swal.stopTimer)
  42. toast.addEventListener('mouseleave', Swal.resumeTimer)
  43. }
  44. })
  45. @endif
  46. </script>
  47. </html>