title: DataTables not working in Laravel blade template
body: <p>Blade template in question: </p>
  
  <pre><code>@extends('2a.layouts.master')
  &lt;link rel="stylesheet" 
  href="//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"&gt;
  &lt;script src="https://code.jquery.com/jquery-3.3.1.js"&gt;&lt;/script&gt;
  &lt;script src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"&gt; 
  &lt;/script&gt;
  
  
  @section('content')
      &lt;div class="row"&gt;
          &lt;table class="table" id="tablegg"&gt;
              &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th class="text-center"&gt;#&lt;/th&gt;
                  &lt;th class="text-center"&gt;First Name&lt;/th&gt;
                  &lt;th class="text-center"&gt;Last Name&lt;/th&gt;
                  &lt;th class="text-center"&gt;Email&lt;/th&gt;
                  &lt;th class="text-center"&gt;Gender&lt;/th&gt;
                  &lt;th class="text-center"&gt;Country&lt;/th&gt;
                  &lt;th class="text-center"&gt;Salary ($)&lt;/th&gt;
                  &lt;th class="text-center"&gt;Actions&lt;/th&gt;
              &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
              &lt;tr&gt;
                  &lt;td&gt;fgfgfd&lt;/td&gt;
                  &lt;td&gt;gfdgf&lt;/td&gt;
                  &lt;td&gt;gfdgdf&lt;/td&gt;
                  &lt;td&gt;gfdgg&lt;/td&gt;
                  &lt;td&gt;aaaaa&lt;/td&gt;
                  &lt;td&gt;bbbbbb&lt;/td&gt;
                  &lt;td&gt;ccccc&lt;/td&gt;
                  &lt;td&gt;dddddd&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;fgfgfd&lt;/td&gt;
                  &lt;td&gt;dddddd&lt;/td&gt;
                  &lt;td&gt;ccccccc&lt;/td&gt;
                  &lt;td&gt;bbbbbbb&lt;/td&gt;
                  &lt;td&gt;aaaaa&lt;/td&gt;
                  &lt;td&gt;bbbbbb&lt;/td&gt;
                  &lt;td&gt;ccccc&lt;/td&gt;
                  &lt;td&gt;dddddd&lt;/td&gt;
              &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  
  @endsection
  @section('scripts')
  
  &lt;script&gt;
      $(document).ready(function() {
          $('#tablegg').DataTable();
      });
  &lt;/script&gt;
  
  @endsection
  </code></pre>
  
  <p>master template (included in every file)</p>
  
  <pre><code>&lt;script src="{{ asset('js/app.js') }}"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('js/upload/core.js') }}"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('js/upload/upload.js') }}"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('js/upload/bootstrap.js') }}"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('js/notification.js') }}"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('js/ajaxSearch/ajaxSearch.js') }}"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('js/ajaxSearch/something.js') }}"&gt;&lt;/script&gt;
  
  @yield('scripts')
  </code></pre>
  
  <p>Unfortunately, even though I am getting the DataTable() suggesting in my code it is still not working. Inside of console I receive this error: Uncaught TypeError: $(...).DataTable is not a function. </p>
  
  <p>Method 1:
  I am loading jquery first and then loading jquery.datatables at the top of the template. I looked up the error and it says it is being caused by not loading jquery first. I can place them at the top of the template (doesn't work) or place them in order inside of master template (doesn't work)</p>
  
  <p>Method 2: 
  I used npm install datatables. This method unfortunately still did not work. Though I did not recieve the same error in the console which was worse because then I had no idea what was wrong. I made sure not to have any typos, and am trying to create only the most basic functionality. </p>
  
  <p>I have the script that calls DataTable() inside of a @yield('scripts') tag. Meaning that it should not run that script until all others have been loaded. </p>
  
  <p>I am using Laravel 5.5 on WAMP server. I have restarted the server as well to see if it helped. </p>
  
  <p>I am not sure what else to try. I could not find anything here on stack overflow or elsewhere to suggest other fixes. I thought I was getting close when I got the error to go away after using npm install but it did not. </p>
  
  <p>Edit: I also used npm install datatables.net, I made sure to only use one at a time because I read having multiple similar files of the code would cause issues.</p>