title: Fatal error: Trait 'Illuminate\Foundation\Events\Dispatchable' not found in C:\xampp\htdocs\chat-app\app\Events\NewMessage.php on line 14
body: <p>Using Pusher with Laravel 5.8 to send messages in real-time generates this error on NewMessage Event file.
  Steps I took to try and debug:</p>
  
  <ol>
  <li><p>tried removing the line "use Dispatchable, InteractsWithSockets, SerializesModels;" inside the Class;</p></li>
  <li><p>tried without using the Classes at the top of the file</p></li>
  </ol>
  
  <p>none of those worked. On Laravel 5.8 Documentation they don't mention using this line inside our Event Classes, maybe it's outdated?!</p>
  
  <p>File looks like this:</p>
  
  <p>`
  
  <pre><code>namespace StyxEminus\Events;
  use StyxEminus\Message;
  use Illuminate\Broadcasting\Channel;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Broadcasting\PrivateChannel;
  use Illuminate\Foundation\Events\Dispatchable;
  use Illuminate\Broadcasting\InteractsWithSockets;
  use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
  
  class NewMessage implements ShouldBroadcast
  {
  use Dispatchable, InteractsWithSockets, SerializesModels;
  
  public $message;
  
  /**
   * Create a new event instance.
   *
   * @return void
   */
  public function __construct(Message $message)
  {
      $this-&gt;message = $message;
  }
  
  /**
   * Get the channels the event should broadcast on.
   *
   * @return \Illuminate\Broadcasting\Channel|array
   */
  public function broadcastOn()
  {
      return new PrivateChannel('messages.' . $this-&gt;message-&gt;to);
  }
  
  public function broadcastWith() {
      return ["message" =&gt; $this-&gt;message];
  }
  }`
  </code></pre>
  
  <p>Local Server: Apache on Xampp;
  Operating System: W10 64bit
  Browser: Brave(chromium) &amp; Chrome</p>