使用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!  

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

if your download folder is located at public folder you can props to import your specific file.

laravel Blade

 @extends('layouts.esic')   
    @section('content')
    <solicitante :pdf ="{{ json_encode(asset('download/form.pdf')) }}"></solicitante>
    @endsection

component vue. (something like this one)

<template>
<a href= {{ pdf }}> Download here. </a>
</template>

<script>
export default {
 props: ['pdf'],

 ..............

Im not sure if this way are you looking for, (sharing some idea :)

Try this one if you want to just insert a link in vue

<a v-bind:href="url">{{ url }}</a>

export default {
  data() {
    return  { url: 'http://anywhere.com'  };
  }
}

Hope this help :)