0

I design my page in localhost which works fine and I include all my paths like that

<link href="{{ asset('public/'.Config::get('config.template_assets').'assets/vendor/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet"> 

but when I run my php artisan serve bootstrap is not including with 404 error ,which mean my server can't found the location of bootstrap, so how should I change my path so that it should be compatible for both localhost and 127 server. And if I remove public from path it works fine

Raja Tayyab
  • 29
  • 1
  • 5
  • Bootstrap should be included in `app.css` when you compiled your assets (`npm run dev`). Have you made sure that the file exists at that location? `localhost` and `127.0.0.1` should work the same. – brombeer Apr 06 '21 at 06:38
  • issue is not only for bootstrap .issue is for all css , script and images so I have to make one path for all which can be accessed by both localhost and 127.0.0.1 – Raja Tayyab Apr 06 '21 at 06:49
  • So have you made sure that the files exist? `public/` should not appear in any url, it's the "DocumentRoot" for your server. `` or a simple `` should load `app.css` from `public/css/app.css` - adapt accordingly – brombeer Apr 06 '21 at 07:00
  • in localhost it don't load from public folder it load from root folder – Raja Tayyab Apr 06 '21 at 07:46
  • What? Are you running two servers? localhost and 127.0.0.1 are basically the same. If "on localhost" it is loading from the root folder your server has a wrong setup! As I said "_`public/` should not appear in any url, it's the "DocumentRoot" for your server._" – brombeer Apr 06 '21 at 12:16

0 Answers0