Home > Software design >  LARAVEL 9: I cannot reach my css file code anytime i have a doube url like this : /user/profile. How
LARAVEL 9: I cannot reach my css file code anytime i have a doube url like this : /user/profile. How

Time:09-20

LARAVEL 9: I am using a template in Laravel 9 and I cannot reach my CSS file code anytime I have a double URL like this : /user/profile. However, It only works when I have a single URL like this: /profile. But I want to be able to reach my CSS files when I have double URLs. How can I solve this? Any suggestions?

CodePudding user response:

Did you put the files correctly in the public folder? Do you invoke it correctly within the blade as the following example:

<link href="{{URL::asset('assets/plugins/fontawesome-free/css/all.min.css')}}" rel="stylesheet">

Have you checked the error by inspecting your browser?

You can check this link contains many useful examples for your case

CodePudding user response:

Put a slash "/" at the beginning of the css address. For example if you have somethin like this:

<link rel="stylesheet" type="text/css" href="css/style.css">

Change it to this:

<link rel="stylesheet" type="text/css" href="/css/style.css">
  • Related