Home > OS >  css is not link successfully into laravel
css is not link successfully into laravel

Time:03-01

Here is my index file in views.admin

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

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

        <title>title</title>
    </head>

And Here is my another file in views.admin

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/admin/style.css">

    <title>title</title>
</head>

index file is working properly but another one is not using css

AND

my css file exists at 'public/css/admin/style.css'

CodePudding user response:

Use this code to link your style or script in public folder

{{ asset('css/admin/style.css') }}

Don't put the public/ folder there, if its not working add this to your .env

ASSET_URL = public/
  • Related