diff --git a/app/Console/Commands/Test/TestEmailCommand.php b/app/Console/Commands/Test/TestEmailCommand.php new file mode 100644 index 00000000..00d0c056 --- /dev/null +++ b/app/Console/Commands/Test/TestEmailCommand.php @@ -0,0 +1,41 @@ +argument('email'); + Mail::raw('Hello World!', function (Message $message) use ($email): void { + $message->to($email) + ->subject('Test Email') + ->html('

Hello World!

'); + }); + + return self::SUCCESS; + } +} diff --git a/app/Console/Commands/Test/TestJobCommand.php b/app/Console/Commands/Test/TestJobCommand.php new file mode 100644 index 00000000..b836d6c6 --- /dev/null +++ b/app/Console/Commands/Test/TestJobCommand.php @@ -0,0 +1,37 @@ +info('Test command output'); + $this->error('Test command output error'); + + return self::SUCCESS; + } +} diff --git a/app/Jobs/Test/TestJob.php b/app/Jobs/Test/TestJob.php new file mode 100644 index 00000000..a0eb39a4 --- /dev/null +++ b/app/Jobs/Test/TestJob.php @@ -0,0 +1,44 @@ +user = $user; + $this->message = $message; + } + + /** + * Execute the job. + */ + public function handle(): void + { + Log::debug('TestJob: '.$this->message, [ + 'user' => $this->user->getKey(), + ]); + } +}