mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
153 - Testing a Console Command
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Invitation;
|
||||
use App\Facades\InvitationCode;
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
||||
/*
|
||||
@@ -13,6 +15,9 @@ use Illuminate\Foundation\Inspiring;
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->describe('Display an inspiring quote');
|
||||
Artisan::command('invite-promoter {email}', function ($email) {
|
||||
$invitation = Invitation::create([
|
||||
'email' => $email,
|
||||
'code' => InvitationCode::generate(),
|
||||
]);
|
||||
})->describe('Invite a new promoter to create an account.');
|
||||
|
||||
Reference in New Issue
Block a user