title: Datatable in laravel mix
body: <p>I have some problem, and I was search for solving this problem, but I still didn't get the solving, I hope Anyone can help me to solve this problem, I put my code in below, Thanks :</p>
  <p>webpack.mix.js :</p>
  <pre><code>mix.autoload({
   jquery: ['$', 'jQuery', 'window.jQuery'],
  })
  
  mix.scripts([
    .js('resources/js/app.js', 'public/js').version()
    .js('resources/js/bootstrap.js', 'public/js').version()
    .js('resources/js/occupant.js', 'public/js').version()
    .sass('resources/sass/app.scss', 'public/css').version()
  ]);
  </code></pre>
  <p>bootstrap.js :</p>
  <pre><code>try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');
  
    require('bootstrap');
  
    require('../../node_modules/datatables.net/js/jquery.dataTables.js');
    require('../../node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js');
  } catch (e) {}
  </code></pre>
  <p>occupant.js :</p>
  <pre><code>var $ = require('jquery');
  
  $(document).ready(function () {
     $(&quot;#tblOccupant&quot;).DataTable(function () {
        
     });
  });
  </code></pre>
  <p>my console error :</p>
  <pre><code>occupant.js?id=043c6fbba06b4c7cd537:10984 Uncaught TypeError: $(...).DataTable is not a function
  </code></pre>