Updates
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Http\Controllers\Agent\helpdesk\NotificationController;
|
||||
use App\Http\Controllers\Common\PhpMailController;
|
||||
use Exception;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class SendReport extends Command
|
||||
{
|
||||
class SendReport extends Command {
|
||||
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
@@ -28,8 +28,8 @@ class SendReport extends Command
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
public function __construct() {
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
@@ -38,22 +38,21 @@ class SendReport extends Command
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
public function handle() {
|
||||
try {
|
||||
if (env('DB_INSTALL') == 1) {
|
||||
$mail = new PhpMailController();
|
||||
$mail->setQueue();
|
||||
$this_report = new NotificationController($mail);
|
||||
$report = $this_report->send_notification();
|
||||
|
||||
|
||||
if ($report !== 0) {
|
||||
loging('sending-mail-report', 'Report has send', 'info');
|
||||
loging('sending-mail-report', 'Report has send','info');
|
||||
//\Log::info("Report has send");
|
||||
$this->info('Report has send');
|
||||
$this->info("Report has send");
|
||||
} else {
|
||||
loging('sending-mail-report', 'Nothing to send', 'info');
|
||||
$this->info('Nothing to send');
|
||||
loging('sending-mail-report', 'Nothing to send','info');
|
||||
$this->info("Nothing to send");
|
||||
}
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
@@ -61,4 +60,5 @@ class SendReport extends Command
|
||||
$this->error($ex->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user