diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php new file mode 100644 index 000000000000..e2d99efa8e93 --- /dev/null +++ b/app/Http/Controllers/ExportController.php @@ -0,0 +1,64 @@ +user()->getCompany(), auth()->user()); + + return response()->json(['message' => 'Processing'], 200); + + } +} diff --git a/app/Http/Requests/Export/StoreExportRequest.php b/app/Http/Requests/Export/StoreExportRequest.php new file mode 100644 index 000000000000..96d322a53df6 --- /dev/null +++ b/app/Http/Requests/Export/StoreExportRequest.php @@ -0,0 +1,39 @@ +user()->isAdmin(); + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return []; + } +} diff --git a/app/Mail/DownloadBackup.php b/app/Mail/DownloadBackup.php new file mode 100644 index 000000000000..5b354a5db265 --- /dev/null +++ b/app/Mail/DownloadBackup.php @@ -0,0 +1,41 @@ +file_path = $file_path; + + $this->company = $company; + } + + /** + * Build the message. + */ + public function build() + { + return $this->from(config('mail.from.address'), config('mail.from.name')) + ->subject(ctrans('texts.download_backup_subject')) + ->markdown( + 'email.admin.download_files', + [ + 'url' => $this->file_path, + 'logo' => $this->company->present()->logo, + 'whitelabel' => $this->company->account->isPaid() ? true : false, + ] + ); + } +}