remove test route

This commit is contained in:
Godfrey M 2024-10-31 12:51:22 -07:00
parent 97a449e80e
commit 7a0f79ecd2

View file

@ -553,33 +553,3 @@ Route::middleware(['auth'])->get(
'/', '/',
[DashboardController::class, 'index'] [DashboardController::class, 'index']
)->name('home'); )->name('home');
Route::get('/test-email', function() {
$item = \App\Models\LicenseSeat::find(1); // Load some test data
$admin = User::find(2);
$target = User::find(1);
$acceptance = null; // Simulate acceptance data
$note = 'Test note';
$settings = Setting::getSettings();
$adminCcEmailsArray = [];
if($settings->admin_cc_email !== '') {
$adminCcEmail = $settings->admin_cc_email;
$adminCcEmailsArray = array_map('trim', explode(',', $adminCcEmail));
}
$ccEmails = array_filter($adminCcEmailsArray);
if (!empty($target->email)) {
Mail::to($target)->cc($ccEmails)->send( new \App\Mail\CheckoutLicenseMail(
$item,
$admin,
$target,
$acceptance,
$note));
} else {
Mail::cc($ccEmails)->send(new \App\Mail\CheckoutLicenseMail(
$item,
$admin,
$target,
$acceptance,
$note));
}
});