2016-03-23 16 views
1
class downloadController extends Controller 
{ 
    public function getDownload(){ 
     $pdfFile = DB::table('computer')->select('pdfFile')->get(); 
     $pathToFile = public_path(). "/sportsPDF/$pdfFile"; 
     $headers = array(
      'Content-Type: application/pdf', 
     ); 
     return response()->download($pathToFile); 
    } 
} 

コンピュータが私のデータベース名」である PDFファイルは、私はすべてのPDFファイルを保存し、私の列名です名前 sportsPDFは私のpdfファイルを含むパブリックフォルダの下のフォルダです。 エラーメッセージは、 "文字列への変換アレイは、"複数のダウンロード

答えて

関連する問題