title: How can I use Laravel's baseurl on the vue.js 2?
body: <p>I have 2 component</p>
  
  <p>Component 1, The name is SearchResultVue.vue component</p>
  
  <p>The component is like this :</p>
  
  <pre><code>&lt;template&gt;
      ...
          &lt;span class="pull-right" v-show="totalall&gt;8"&gt;
              &lt;pagination :data="list" :baseUrl="this.Laravel.baseUrl" :total="totalPage" :nextPage="nextPage" :prevPage="prevPage"&gt;&lt;/pagination&gt;
          &lt;/span&gt;
      ...
  &lt;/template&gt;
  </code></pre>
  
  <p>The component call component 2. The name is Pagination.vue component</p>
  
  <p>The Pagination component is like this :</p>
  
  <pre><code>&lt;template&gt;
      &lt;nav aria-label="Page navigation"&gt;
          &lt;ul class="pagination"&gt;
              &lt;li&gt;
                  &lt;a :href="prevPage" aria-label="Previous"&gt;
                      &lt;span aria-hidden="true"&gt;&amp;laquo;&lt;/span&gt;
                  &lt;/a&gt;
              &lt;/li&gt;
              &lt;li v-for="i in total"&gt;
                  &lt;a :href="baseUrl+'/search-result?page='+i"&gt;{{i}}&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;a :href="nextPage" aria-label="Next"&gt;
                      &lt;span aria-hidden="true"&gt;&amp;raquo;&lt;/span&gt;
                  &lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
  &lt;/template&gt;
  &lt;script&gt;
      export default{
          props:['total', 'data', 'nextPage', 'prevPage'],
          computed:{
              baseUrl(){
                  return window.Laravel.baseUrl
              }
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>When executed, in the console exist 2 error </p>
  
  <p>Error 1 is like this :</p>
  
  <blockquote>
    <p>[Vue warn]: Property or method "Laravel" is not defined on the
    instance but referenced during render. Make sure to declare reactive
    data properties in the data option.</p>
  </blockquote>
  
  <p>Error 2 is like this :</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'baseUrl' of undefined</p>
  </blockquote>
  
  <p>How can I solve the errors?</p>