Notify PHP
Notify PHP
php
namespace App\Console\Commands;
use App\Models\Server;
use App\Models\User;
use App\Notifications\ServerCreationError;
use Illuminate\Console\Command;
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send test notifications to this user';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @param int $id
* @return int
*/
public function handle()
{
User::findOrFail($this->argument('id'))->notify(new
ServerCreationError(Server::all()[0]));