即使我有Laravel返回文件也找不到

时间:2019-10-11 02:48:49

标签: laravel storage

我正在使用laravel进行开发,在此之前一切正常,但是在本周,laravel总是返回file not found,即使我已经将其存储。为什么会这样?  Error from laravelMy file location

public function file()
    {
        $file= asset('storage/documents/President New Year Message 2019 (Text only).pdf');

        $headers = [
            'Content-Type' => 'application/pdf',
        ];

        return response()->download($file, 'President New Year Message 2019 (Text only).pdf', $headers);
    }

0 个答案:

没有答案