Home > Software design >  How to add a css file in laravel?
How to add a css file in laravel?

Time:05-28

I want to apply margin-bottom on #createNewBook, But it's not working. I added a CSS file in laravel by using <link rel="stylesheet" href="/assets/css/style.css">. Can anyone tell me how to add a CSS file to my laravel project?

This is my HTML code in laravel: enter image description here

This is CSS code: enter image description here

This is my directory format:

enter image description here

And this is the output:

enter image description here

CodePudding user response:

Put the assets folder in public then in the blade file use this syntax to load css

{{asset('assets/css/style.css')}}
  • Related