multiple bug fixes including sender ID filtering
This commit is contained in:
43
app/Console/Commands/ProcessHolidayAlert.php
Normal file
43
app/Console/Commands/ProcessHolidayAlert.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Http\Controllers\HolidaysController;
|
||||
class ProcessHolidayAlert extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'holidayalerts:send';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Send Upcoming Holiday Alerts to team members';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(HolidaysController $hoidays_alerts)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->hoidays_alerts = $hoidays_alerts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->hoidays_alerts->getHolidayDetails();
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,8 @@ class Kernel extends ConsoleKernel
|
||||
*/
|
||||
protected $commands = [
|
||||
Commands\SendContractRenewalReminders::class,
|
||||
Commands\ProcessClientContractRenewalAlert::class
|
||||
Commands\ProcessClientContractRenewalAlert::class,
|
||||
Commands\ProcessHolidayAlert::class
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -30,6 +31,7 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->command('renewal:send')->weekdays()->at('13:00');
|
||||
$schedule->command('client_renewal:send')->weekdays()->at('14:00');
|
||||
$schedule->command('support_fees_renewal:send')->weekdays()->at('15:00');
|
||||
$schedule->command('holidayalerts:send')->weekdays()->at('16:00');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user