ctf0 / Laravel-Media-Manager

A "Vuejs & Laravel" Media Manager With Tons of Features
MIT License
829 stars 179 forks source link

Can you give more explanation to install this? #4

Closed husinid closed 6 years ago

husinid commented 6 years ago

I'm really noob at laravel, and I really want to use this Laravel Media Manager to my project, i have followed your guide usage and still it didn't same as demo as you provided. Please give full explanation how to install this on laravel project.

GioChocolateBro commented 6 years ago

I feel like its missing some files. I almost got it running but it requires a lot of input. Or I'm doing it wrong.

ctf0 commented 6 years ago

@husinid i tried to keep it as simple as possible however here are the steps to install

still

there are a couple of steps you can ignore

as i will update the package with some changes so you can follow all the other steps and simply open localhost/media to get the manager.

i understand that this instructions may sound kinda complicated to you, but unless you get familiar with how laravel works, anything will sound complicated to you.

ctf0 commented 6 years ago

@GioChocolateBro can you tell me what are the errors you are getting so i can help ?

ctf0 commented 6 years ago

done https://github.com/ctf0/Laravel-Media-Manager#--simple

husinid commented 6 years ago

Hi, thanks for your explanation. I followed your instructions and now i got this error while running npm run watch

> @ watch /var/www/html/ctf0media
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

 10% building modules 2/2 modules 0 active                                         
Webpack is watching the files…

 95% emitting                                                                         

 ERROR  Failed to compile with 1 errors                                           13:14:45

This dependency was not found:

* /var/www/html/ctf0media/resources/assets/vendor/MediaManager/sass/undefined/media.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/vendor/MediaManager/sass/undefined/media.scss

To install it, you can run: npm install --save /var/www/html/ctf0media/resources/assets/vendor/MediaManager/sass/undefined/media.scss

and then i tried running npm install --save /var/www/html/ctf0media/resources/assets/vendor/MediaManager/sass/undefined/media.scss then i got this error

npm ERR! code ENOLOCAL
npm ERR! Could not install from "resources/assets/vendor/MediaManager/sass/undefined/media.scss" as it does not contain a package.json file.
ctf0 commented 6 years ago

the prob is vendor/MediaManager/sass/undefined/ have u added MIX_MM_FRAMEWORK=bulma to ur .env file ?

husinid commented 6 years ago

yes, I did

ctf0 commented 6 years ago

update to the latest release make sure you have laravel v5.4 updated to latest update node & npm

npm -v: 5.3.0 node -v: v8.2.1

however i would recommend that you try the simple installation first which doesnt require any changes from ur side except the .env setting

husinid commented 6 years ago

I tried again and yes it worked. But i have another problem. When I open localhost/media , in Media Library section, it always says LOADING YOUR MEDIA FILES , now what the problem?

ctf0 commented 6 years ago

check console errors, plz note this is not a step by step tutorial, tickets are only for bugs.

husinid commented 6 years ago

It says [Vue warn]: Cannot find element: #app and You are running Vue in development mode. Make sure to turn on production mode when deploying for production.

ctf0 commented 6 years ago

update to https://github.com/ctf0/Laravel-Media-Manager/blob/master/src/resources/views/bulma/media.blade.php#L17

husinid commented 6 years ago

Well. It all works now. Thank you. But I have to changed script in Line 199 media.blade.php form action changed to route('media.upload')

GioChocolateBro commented 6 years ago

Well I figured most of it out by looking through the source, it wasn't automatically loading the routes so I took them from the source and loaded them in my routes. Also had some struggles with the bulma env and finding the views within that folder. I hacked it together.

Kinda working on something else right now, getting back to this next week. Ill give it another clean start.