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 poser 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
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 poser 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
Share Improve this question asked Aug 6, 2017 at 9:42 JejeJeje 1111 silver badge5 bronze badges 7- how did you load the assets? what is the error in browser console? – bhill77 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 – Jeje Commented Aug 6, 2017 at 9:47
- Please show the code how you load your assets in your views/layout/template file. – Dharma Saputra Commented Aug 6, 2017 at 9:50
- please try this douglastarr./how-to-allow-unsafe-ports-in-chrome – bhill77 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 – Jeje Commented Aug 6, 2017 at 10:05
1 Answer
Reset to default 7now i can use localhost:8000 and load all of my file in public folder with mand Laravel project: php -S localhost:8000 -t public
reference from How to include CSS in laravel 5 running with artisan?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742419643a4440423.html
评论列表(0条)