Route::match(['get'], $segment . '/{id}/package/{action}/{version}', $controller . '@package');
Route::match(['get'], $segment . '/{id}/package/{action}/scorm/{scormversion}', $controller . '@packageScorm');
Route::match(['get'], $segment . '/{id}_{hash}/download/{file}', $controller . '@download')->withoutMiddleware([CheckIfAdmin::class]);;
+ Route::match(['get','post'], $segment . '/download_settings/{file}', $controller . '@downloadSettings')->withoutMiddleware([CheckIfAdmin::class])->name("download_settings");
}
protected function setupDownloadDefaults()
Alert::add('success', __('La compilation a été placée en file d\'attente. Vous recevrez un email lorsqu\'elle sera terminée.'))->flash();
return back();
}
+
+ protected function downloadSettings($file) {
+ $name = "settings_export";
+ $path = base64_decode($file);
+ if(!file_exists($path)) abort(404);
+ return response()->download($path, $name . '.xlsx')->deleteFileAfterSend(true);
+ }
}
*/
public function setData($post)
{
-
$this->replyTo($post['email'], $post['prenom'] . ' ' . $post['nom']);
$this->from('tech@fluidbook.com');
$this->to('tech@fluidbook.com');