1

I am trying to load css, js and images files kept inside my public/css/assests folder. Link which i have been giving is

 <link rel="stylesheet" href="/public/css/assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.min.css">

But when i open my page in browser it gives error that is

 GET http://localhost:8000/public/css/assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.min.css net::ERR_ABORTED

Please tell me what to do to resolve the error.

3 Answers 3

5

you can use asset() to load css and js and images from public folders.asset will point to public folder

<link rel="stylesheet" href="{{asset('css/assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.min.css')}}">

asset()

asset() will generate a URL for an asset using the current scheme of the request (HTTP or HTTPS):

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

Comments

1

please use asset() function

<link rel="stylesheet" href="<?php echo asset('css/assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.min.css'); ?>">

asset() gives full url of your root directory

Comments

0

/ points to public folder by default, so remove /public

  <link rel="stylesheet" href="/css/assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.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.