Wire admin studio SSR and search infrastructure

This commit is contained in:
2026-05-01 11:46:06 +02:00
parent 257b0dbef6
commit 18cea8b0f0
329 changed files with 197465 additions and 2741 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Mail;
use App\Mail\TestMail;
class SendTestMail extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mail:send-test {email?} {--body=}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send a test email to the given address or MAIL_USERNAME';
public function handle(): int
{
$email = $this->argument('email') ?? env('MAIL_USERNAME') ?? 'gregor@klevze.com';
$body = $this->option('body') ?? "This is a test email sent by php artisan mail:send-test.";
try {
Mail::to($email)->send(new TestMail($body));
} catch (\Exception $e) {
$this->error('Failed to send mail: ' . $e->getMessage());
return 1;
}
$this->info("Test mail sent to {$email}");
return 0;
}
}