- session()->flash('success', trans('settings.maint_image_cleanup_success', ['count' => $deleteCount]));
+ $this->showSuccessNotification(trans('settings.maint_image_cleanup_success', ['count' => $deleteCount]));
+ }
+
+ return redirect('/settings/maintenance#image-cleanup')->withInput();
+ }
+
+ /**
+ * Action to send a test e-mail to the current user.
+ */
+ public function sendTestEmail()
+ {
+ $this->checkPermission('settings-manage');
+
+ try {
+ user()->notify(new TestEmail());
+ $this->showSuccessNotification(trans('settings.maint_send_test_email_success', ['address' => user()->email]));
+ } catch (\Exception $exception) {
+ $errorMessage = trans('errors.maintenance_test_email_failure') . "\n" . $exception->getMessage();
+ $this->showErrorNotification($errorMessage);