title: show message after form submit laravel
body: <p>hi I'm a beginner in Laravel I want to use <a href="https://sweetalert2.github.io/" rel="nofollow noreferrer">sweetalert2</a> in my Laravel website but it did not display in the view</p>
  
  <p>I use  branch dist from Github </p>
  
  <p>so in my <code>**master_layout.blade.php**</code> this is my code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charest="utf-8"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;title&gt;@yield('title')&lt;/title&gt;
      &lt;link href="https://fonts.googleapis.com/css?family=Cairo&amp;display=swap" rel="stylesheet"&gt;
      &lt;link href="css/all.min.css" rel="stylesheet" type="text/css"&gt;
      &lt;link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"&gt;
      &lt;link href="css/jquery-ui.min.css" rel="stylesheet" type="text/css"&gt;
      &lt;link href="css/jquery-ui.theme.min.css" rel="stylesheet" type="text/css"&gt;
      **&lt;link href="css/sweetalert2.min.css" rel="stylesheet" type="text/css"&gt;**
      &lt;link href="css/main_style.css" rel="stylesheet" type="text/css"&gt;
      &lt;link href="css/responsive.css" rel="stylesheet" type="text/css"&gt;
      &lt;link rel="icon" type="image/png" href="img/favorite-icon.png" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
      @include('include/Navbar')
      &lt;main&gt;
  
          @include('include/Sidebar')
  
          @include('include/HamburgerSidebar')
  
          &lt;div class="container"&gt;
              @yield('Content')
          &lt;/div&gt;
      &lt;/main&gt;
  
      &lt;script src="Js/jquery-3.4.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="Js/popper.min.js"&gt;&lt;/script&gt;
      &lt;script src="Js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="Js/jquery-ui.min.js"&gt;&lt;/script&gt;
      **&lt;script src="Js/sweetalert2.all.min.js"&gt;&lt;/script&gt;**
      &lt;script src="Js/main-JQ.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and in my controller store:</p>
  
  <pre><code>public function store(Request $request)
      {
          $request_order=$request-&gt;section_order;
          if(empty($request_order)){
              $order_last = Section::latest('section_order')-&gt;get();
              if(empty($order_last)){
                  $request_order=1;
              }else{
                  $request_order=$order_last[0]['section_order']+1;
              }
          }
  
          $request-&gt;validate([
              'section_name' =&gt; ['required','min:3'],
              'section_pic' =&gt;['image']
          ]);
  
          $image = $request-&gt;file('section_pic');
  
          if ( $image === null) {
              $image_name = 'default_img.jpg';
          }else{
              $image_name = rand(1, 20) . time() . $image-&gt;getClientOriginalName();
              $image-&gt;move(public_path('img'),$image_name);
          }
  
          $input_data = array(
          'section_order' =&gt; $request_order,
          'section_name' =&gt; $request-&gt;section_name,
          'section_pic' =&gt; $image_name
          );
  
          Section::create($input_data);
  
              return redirect('/Sections')-&gt;withSuccess('Success message');
      }
  </code></pre>
  
  <p>and in my view:</p>
  
  <pre><code>@if(Session::has('success'))
  &lt;script type="text/javascript"&gt;
     Swal.fire(
             'Good job!',
             'Successfully Saved!',
             'success'
     );
  &lt;/script&gt;
  @endif
  </code></pre>
  
  <p>the store function works fine but not display sweetalert in my view</p>
  
  <p>and I put all CSS and js file and images folder in public folder is that correct or not?</p>