I put my CSS file inside public/css
folder. I added CSS file in head section like below.
<link href="{{ url('/css/app.css') }}" rel="stylesheet">
But CSS is not working.
this folder css or whatever you named it, must be placed inside your public folder. Show activity on this post. Search for Public folder in Laravel. Create css folder (that contains stylesheet files of your project), javascript and Images folder (contains images that you will use in your project).
Search for Public folder in Laravel. Create css folder (that contains stylesheet files of your project), javascript and Images folder (contains images that you will use in your project). Go to layouts in app.blade.php file update html code using blade syntax:
As with CSS, we may use Laravel Mix to easily compile JavaScript components into a single, browser-ready JavaScript file.
By default, the Laravel package.json file includes a few packages such as lodash and axios to help you get started building your JavaScript application. Feel free to add or remove from the package.json file as needed for your own application. Once the packages are installed, you can use the npm run dev command to compile your assets.
In Laravel 8, make sure your files are in the public folder and reference them like this:
<link rel="stylesheet" type="text/css" href="{{ url('css/app.css') }}">
This is working for me in Laravel 8 (make sure your files are in the public folder)
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With