[Vuejs]-Can't get a proper link using Laravel and Vue

1๐Ÿ‘

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

๐Ÿ‘คankit patel

1๐Ÿ‘

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 ๐Ÿ™‚

๐Ÿ‘คKenneth

1๐Ÿ‘

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 ๐Ÿ™‚

๐Ÿ‘คemjr

Leave a comment