I'm getting stuck when I launch my laravel 5 project on localhost on Google Chrome. I'm using the bootstrap admin panel from this repo: https://github.com/start-laravel/sb-admin-laravel-5
I installed al the needs, like npm, bower and gulp.
I cleared cache and then I run php artisan serve
When I navigate to localhost:8000 the page loads fine, but the styles.css and the frontend.js will not be loaded.
I'm getting the following error:
GET http://localhost:8000/assets/stylesheets/styles.css net::ERR_INVALID_HTTP_RESPONSE
GET http://localhost:8000/assets/scripts/frontend.js net::ERR_INVALID_HTTP_RESPONSE
GET http://localhost:8000/favicon.ico net::ERR_INVALID_HTTP_RESPONSE
I've tried the following things:
My Code
<link rel="stylesheet" href="{{ asset("assets/stylesheets/styles.css") }}" />
<script src="{{ asset("assets/scripts/frontend.js") }}" type="text/javascript"></script>
But
When I run my project using XAMPP (the url then is: http://localhost/website-monitor/public/) it all works fine.. :/ the only thing is, i'm running the site just to going to the path and not using artisan..
If anyone have the solution, please let me now, i've spilled my whole day on this annoying bug
Instead of php artisan serve try using php -S localhost:8000 -t public in your project's home directory. Works like a charm for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With