title: How to change public directory to public_html directory for Laravel Mix
body: <p>I'm using Laravel 8 and I wanted to install Sweet Alert. So after downloading it and adding <code>require('sweetalert');</code> to <code>bootstrap.js</code>, I ran the command <code>npm run production</code>.</p>
  <p>Then I have included this in my <code>master.blade.php</code>:</p>
  <pre><code>&lt;script src=&quot;{{ asset('/js/app.js') }}&quot;&gt;&lt;/script&gt;
  @include('sweet::alert')
  </code></pre>
  <p>Now because I had changed my public directory from <code>public</code> to <code>public_html</code>, Laravel  <code>asset()</code> function would call the <code>public_html/js/app.js</code> and this is wrong because Laravel Mix generated <code>app.js</code> and <code>app.css</code> in the <code>public</code> directory.</p>
  <p>So the question is how can I change the default generation of Laravel Mix which is <code>public</code> to <code>public_html</code> ?</p>
  <p>Here is my <code>AppServiceProvider.php</code>:</p>
  <pre><code>public function register()
      {
          $this-&gt;app-&gt;bind('path.public', function(){
              return base_path() . '/public_html';
          });
      }
  </code></pre>