0

Having a bit of an issue which has been irritating me for a while now. Got a windows machine with a Vagrant box (Ubuntu 15.04) that refuses to resolve any CSS or JS Files from the public directory which breaks a lot of my pages when i'm working on this machine.

On my Macbook however, everything works absolutely fine, all the files are resolved with no issue which leads me to believe it's a Vagrant issue on windows.

I've got synced folders set up on Windows, My laravel install's (Laravel 5.1) located at C:\blog, this is how the synced folders are set in my vagrant file;

config.vm.synced_folder "C:/blog", "/vagrant"

I haven't modified the public paths or anything, all the core configuration's set up as stock. One particular file my Laravel install can't resolve is jsCookie.js which is located in public/javascript/jsCookie.js, Chrome dev tools reports this as a 404;

GET http://localhost:8080/javascript/jsCookie.js 

And i'm trying to access the file like this;

    <script src="/javascript/jsCookie.js"></script>
2
  • What's your file permissions on the public folders? Commented Apr 26, 2016 at 22:21
  • I set the public directory and all its contents to 777 in a bid to make it work, it had no effect unfortunately Commented Apr 27, 2016 at 6:50

1 Answer 1

1
<script src="{{ asset('/javascript/jsCookie.js') }}"></script>

Try this if you were used

php artisan serve --host=localhost --port=8080
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.