0

I pass the id with the route, and the route is directed to the controller.

<a href="{{URL::to('editShopKeeper/' . $shopkeeper->id . '/edit')}}">

it fetches correct id and it goes to url ,but the page css and jquery does not load, because id is appended to url. Can anyone please help me to solve the problem.

"NetworkError: 404 Not Found - http://localhost/fg/public/editShopKeeper/9/assets/icons/flags/flags.min.css" flags.min.css "NetworkError: 404 Not Found - http://localhost/fg/public/editShopKeeper/9/bower_components/uikit/css/uikit.almost-flat.min.css"

2 Answers 2

1

If your link href attribute doesn't start with a /, the path is relative to the url you're viewing. try changing the css href attribute from assets/icons/flags/flags.min.css to /assets/icons/flags/flags.min.css

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

Comments

0

You can use the base tag to set a absolute path for loading CSS / JS.

<base href="http://localhost/fg/public/" />

As an alternative, you always can use the full path while loading the CSS / JS.

2 Comments

Thanks for your Reply....Sorry i am working in laravel,,i have already gave a path as <link rel="stylesheet" href="assets/icons/flags/flags.min.css" media="all">
As a full path you have to use http://localhost/fg/public/assets/........ Otherwise, you can take a look at the other answer.

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.