title: Laravel event dispatch in web.php
body: <p>I just wanted to use event broadcasting in Laravel and I followed a tutorial video. But problem shows up in the beginning. The tutorial shows what to do in <code>web.php</code> and it goes like this:</p>
  <pre><code>Route::get( uri: '/'. action: function () {
     eventName::dispatch();
     return view( view: 'welcome');
  });
  </code></pre>
  <p>The problem is I have a different route formula in my <code>web.php</code> which is like this:</p>
  <pre><code>Route::get('{path}', SpaController::class)-&gt;where('path', '(.*)');
  </code></pre>
  <p>The question is, how to dispatch the event in my <code>web.php</code>?</p>