Skip to content

Commit

Permalink
fix queue insert log based on config status
Browse files Browse the repository at this point in the history
  • Loading branch information
arif98741 committed Sep 24, 2022
1 parent bbe0e10 commit dbe4fe7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Job/SendSmsJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Config;
use JsonException;
use Psr\Http\Message\ResponseInterface;
use Xenon\LaravelBDSms\Facades\Logger;
Expand Down Expand Up @@ -118,6 +119,9 @@ private function getMethodHandler()
*/
private function insertLoggerLog(array $log): void
{
Logger::createLog($log);
$config = Config::get('sms');
if ($config['sms_log']) {
Logger::createLog($log);
}
}
}

0 comments on commit dbe4fe7

Please sign in to comment.