0

in the custom.blade.php file, css is linked:

<link rel="stylesheet" href="{{URL::asset('assets/bootstrap-4.1.3/bootstrap.min.css')}}">

it generates this location:

http://localhost.laravel/assets/bootstrap-4.1.3/bootstrap.min.css 

but in this URL don't get the CSS file, I get error: enter image description here

Server document_root for laravel app is:

/var/www/laravel/public 

Here is the directory map:

enter image description here

here is the server configuration file: enter link description here

3
  • try with href="{{ asset('assets/bootstrap-4.1.3/css/bootstrap.min.css') }}" Commented Aug 31, 2018 at 10:16
  • your path for file is wrong. css folder is missing Commented Aug 31, 2018 at 10:17
  • didn't noticed that, now it's working. Thanks. Commented Aug 31, 2018 at 10:32

3 Answers 3

4

The CSS files not loading is related to an error in the file path. You forgot the css folder inside the bootstrap-* folder

{{ asset('assets/bootstrap-4.1.3/css/bootstrap.min.css') }}

The error shown in the screenshot is more related to a view not being found or an url/ route not defined.

Sign up to request clarification or add additional context in comments.

1 Comment

oops! sometimes a silly mistake ruins some hours! It's working now. Thanks a lot :)
1

You don't need URL and you are missing css directory.

  <link rel="stylesheet" href="{{asset('assets/bootstrap-4.1.3/css/bootstrap.min.css')}}">

Comments

0

You are missing the css folder part in your path

<link rel="stylesheet" href="{{ URL::asset('assets/bootstrap-4.1.3/css/bootstrap.min.css') }}">
                                                                  ^^^^

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.