jeudi 29 novembre 2018

how to return download file and continue execute another code in only controller laravel

i have a controller like this:

public function export() {
  $this->getTempalte();
  $post=Post::find(1)->get();
  return redirect()->back()->with($post);
}
public function getTempalte(){
  return Storage::download('public\template\note.docx');
}

but when i run this controller, it called getTemplate function but it dont retunt file, and other code in export function still continue



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2DSSUZD
via IFTTT

Aucun commentaire:

Enregistrer un commentaire