<?php namespace Sma\Transaction\Workflow; use Sma\Transaction\Models\Transaction; use Sma\Transaction\Notifications\Transaction as TransactionNotifyer; use Notification; class TransactionNotification { /** * Send the notification to the users after complete. * * @param Transaction $transaction * * @return void */ public function complete(Transaction $transaction) { return Notification::send($transaction->user, new TransactionNotifyer($transaction, 'complete'));; } /** * Send the notification to the users after verify. * * @param Transaction $transaction * * @return void */ public function verify(Transaction $transaction) { return Notification::send($transaction->user, new TransactionNotifyer($transaction, 'verify'));; } /** * Send the notification to the users after approve. * * @param Transaction $transaction * * @return void */ public function approve(Transaction $transaction) { return Notification::send($transaction->user, new TransactionNotifyer($transaction, 'approve'));; } /** * Send the notification to the users after publish. * * @param Transaction $transaction * * @return void */ public function publish(Transaction $transaction) { return Notification::send($transaction->user, new TransactionNotifyer($transaction, 'publish'));; } /** * Send the notification to the users after archive. * * @param Transaction $transaction * * @return void */ public function archive(Transaction $transaction) { return Notification::send($transaction->user, new TransactionNotifyer($transaction, 'archive'));; } /** * Send the notification to the users after unpublish. * * @param Transaction $transaction * * @return void */ public function unpublish(Transaction $transaction) { return Notification::send($transaction->user, new TransactionNotifyer($transaction, 'unpublish'));; } }