douya2982 2017-09-22 00:40
浏览 116

使用Laravel和Vue无法获得正确的链接

Well I got this problem for a few days now. My issue is: In my .vue page I created the followed link to download a simple PDF file:

<a href= {{ asset('download/form.pdf') }}> Download here. </a>

(The link shows up normally.)

The blade:

@extends('layouts.esic')   
@section('content')
<solicitante></solicitante>
@endsection

But when I click DOWNLOAD HERE I got a error back:

Sorry, the page you are looking for could not be found.

I mean. The file is placed at the public folder and code seems okay. Am I missing something?

Cheers!  

  • 写回答

3条回答 默认 最新

  • dtkl55257 2017-09-22 01:44
    关注

    To make itaccessible from the web, you need to create a symbolic link from public/storage/downlaod to storage/app/public/download

    ln -s /home/vagrant/Code/laravel-project-name/storage/app/public/download /home/vagrant/Code/laravel-project-name/public/storage/download

    评论

报告相同问题?