4

i have xampp control panel v3.2.2, php version 5.6.24, and my laravel version is 5.4.32. in windows 7 32-bit

i was create project laravel using composer create-project laravel/laravel simpleproject --prefer-dist and i do php artisan make:auth

my question when im running my apps using php artisan serve and use localhost:8000 they not load any css file and js file in my public folder.

when im running my apps using localhost/simpleproject/public/ its going normal and haven't problem with load any css and js

7
  • how did you load the assets? what is the error in browser console? Commented Aug 6, 2017 at 9:45
  • <link href="{{ asset('/css/app.css') }}" type="text/css" rel="stylesheet"> and error console = Failed to load resource: net::ERR_INVALID_HTTP_RESPONSE Commented Aug 6, 2017 at 9:47
  • Please show the code how you load your assets in your views/layout/template file. Commented Aug 6, 2017 at 9:50
  • please try this douglastarr.com/how-to-allow-unsafe-ports-in-chrome Commented Aug 6, 2017 at 9:51
  • still cant load css and js, i use "C:\Program Files\Google\Chrome\Application\chrome.exe" --explicitly-allowed-ports=80,8000,433,81,84 Commented Aug 6, 2017 at 10:05

1 Answer 1

7

now i can use localhost:8000 and load all of my file in public folder with command Laravel project: php -S localhost:8000 -t public reference from How to include CSS in laravel 5 running with artisan?

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.