alexusmai / vue-laravel-file-manager

Frontend for Laravel File Manager on Vue.js
MIT License
359 stars 161 forks source link

How to integrate this in Laravel application? #83

Closed iwasherefirst2 closed 3 years ago

iwasherefirst2 commented 3 years ago

I would like to make some customization's to the vue files for my application. How can I integrate this in my Laravel application?

I copied the entire content of https://github.com/alexusmai/vue-laravel-file-manager/tree/master/src into /resources/assets/js/file-manager

Then I created a file_manager.js like this:

import Vue from 'vue';
import Vuex from 'vuex';
import FileManager from './file-manager/FileManager.vue';

Vue.use(Vuex);

// create Vuex store, if you don't have it
const store = new Vuex.Store();

Vue.use(FileManager, {store});

Vue.component('file-manager', FileManager);

const app = new Vue({
    store,
    el: '#app'
});

and added this to webpack.mix.js :

.js('resources/assets/js/file-manager.js', 'public/js')

npm run dev compiles sucessfully, but when I open a page with this content:


<div style="height: 600px;">
    <div id="app">
        <file-manager></file-manager>
    </div>
</div>
<script src="{{ asset('js/file-manager.js') }}"></script>
`` `

I get the following errors:

![image](https://user-images.githubusercontent.com/1765602/114691161-aa2fcc80-9d17-11eb-85a6-44dbff3aaddf.png)

Am I missing something? Do I have to include the vue`s differently in my Laravel application?
iwasherefirst2 commented 3 years ago

https://stackoverflow.com/questions/67089068/how-to-customize-vue-filemanager-frontend-in-laravel