commit16
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\InvestmentOpportunityAlerts;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
final class DispatchInvestmentAlerts extends Command
|
||||
{
|
||||
protected $signature = 'investmoz:dispatch-opportunity-alerts';
|
||||
|
||||
protected $description = 'Generate due opt-in alerts from public catalogues, without external messages';
|
||||
|
||||
public function handle(InvestmentOpportunityAlerts $alerts): int
|
||||
{
|
||||
if (! $alerts->installed()) {
|
||||
$this->warn('Opportunity alerts schema is not installed.');
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
$this->info('Matched public catalogue items: '.$alerts->dispatchDue());
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user