Created
November 18, 2015 07:37
-
-
Save cod3beat/1f95a29c1b71eeaa958b to your computer and use it in GitHub Desktop.
Menjalankan Event Mailer di background
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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