clrghouz/app/Console/Commands/NetmailTest.php

40 lines
777 B
PHP
Raw Normal View History

2021-11-26 13:36:57 +00:00
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Notification;
use App\Models\Address;
use App\Notifications\NetmailTest as NetmailTestNotification;
2021-11-26 13:36:57 +00:00
class NetmailTest extends Command
2021-11-26 13:36:57 +00:00
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'netmail:test'
.' {ftn : FTN to send netmail to}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send a netmail test message';
/**
* Execute the console command.
*
* @return mixed
* @throws \Exception
*/
public function handle()
{
$ao = Address::findFTN($this->argument('ftn'));
Notification::route('netmail',$ao)->notify(new NetmailTestNotification($ao));
2021-11-26 13:36:57 +00:00
}
}