diff --git a/app/Events/PostCreated.php b/app/Events/PostCreated.php index 013f20d5..6234ba0e 100644 --- a/app/Events/PostCreated.php +++ b/app/Events/PostCreated.php @@ -8,10 +8,11 @@ use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Contracts\Broadcasting\ShouldBroadcast; +use Illuminate\Contracts\Events\ShouldDispatchAfterCommit; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; -class PostCreated implements ShouldBroadcast +class PostCreated implements ShouldBroadcast, ShouldDispatchAfterCommit { use Dispatchable, InteractsWithSockets, SerializesModels;