-
-
Save dracony/84fac9af4fb7b0063f648d8b57cb42e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use App\User; | |
use App\DripEmailer; | |
use Illuminate\Console\Command; | |
class SendEmails extends Command | |
{ | |
protected $signature = 'register {user} {key}'; | |
protected $description = 'Registers'; | |
private $client; | |
public function __construct() | |
{ | |
$this->client = new Client([ | |
'base_uri' => 'http://127.0.0.1' | |
]); | |
parent::__construct(); | |
} | |
public function handle(DripEmailer $drip) | |
{ | |
$this->client->post('/register', [ | |
'json' => [ | |
'username' => $input->getArgument('username'), | |
'publicKey' => file_get_contents($input->getArgument('publicKey')) | |
] | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment