mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Add $sync parameter to send() method of Mail, SMS and Push classes #2402
This commit is contained in:
parent
7e9dd8f297
commit
b6c444c536
3 changed files with 9 additions and 6 deletions
|
|
@ -507,12 +507,13 @@ class SMS
|
|||
/**
|
||||
* Send the message.
|
||||
*
|
||||
* @param bool $sync
|
||||
* @return bool
|
||||
*/
|
||||
public function send(): bool
|
||||
public function send(bool $sync = false): bool
|
||||
{
|
||||
// If queue is enabled, send asynchronously.
|
||||
if (config('queue.enabled') && !defined('RXQUEUE_CRON'))
|
||||
if (!$sync && config('queue.enabled') && !defined('RXQUEUE_CRON'))
|
||||
{
|
||||
Queue::addTask(self::class . '::' . 'sendAsync', $this);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue