Referencing local folders into head laravel

2019-08-23 21:35发布

问题:

Im including custom bootstrap folder & css into laravel index, but none ofmy tries works, appreciate help of how to make it.

i have placed the folders in public folder of lavarel

<link href="css/StyleSheet_landingPage.css" rel="stylesheet">
   <link href="Content/font-awesome.min.css" rel="stylesheet" />

Root order

回答1:

As @Harven suggested in the comments, you should read up on using the asset helper method with Laravel.

Assuming your stylesheet lives at the following:

Laravel/public/css/StyleSheet_landingPage.css

Then this will work.

<link href="{{ asset('css/StyleSheet_landingPage.css') }}" rel="stylesheet" type="text/css" >


回答2:

Try maybe just like here:

<link href="/css/StyleSheet_landingPage.css" rel="stylesheet">
<link href="/Content/font-awesome.min.css" rel="stylesheet" />