Skip to content

Instantly share code, notes, and snippets.

@cod3beat
Created November 18, 2015 07:37
Show Gist options
  • Save cod3beat/1f95a29c1b71eeaa958b to your computer and use it in GitHub Desktop.
Save cod3beat/1f95a29c1b71eeaa958b to your computer and use it in GitHub Desktop.
Menjalankan Event Mailer di background
<?php
// Event handler ini akan berjalan di background
class ChallengeEventMailer extends QueuedEventHandler
{
public function whenUnpublishedChallengeWasPublished($job, $data)
{
try {
// Kirim email di background
$job->delete();
} catch (\Exception $e) {
\Log::error($e);
throw $e;
}
}
public function whenUnpublishedChallengeWasCreated($job, $data)
{
}
// dsb
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment