How to include Custom style sheet in Flatly front end theme

  • Hi,
    How can I include my custom style sheet on my master blade.
    Using {!! Theme::style('css/custom.css') !!} is not working for me. Is there any other way to achieve this?

  • Global Moderator

    @deben Hey, where is the css file located exactly?

  • Themes/Flatly/assets/css/custom.css

  • Global Moderator

    @deben It looks like you need to publish assets php artisan asgard:publish:theme Flatty

  • @armababy said:

    php artisan asgard:publish:theme Flatty

    I run this command and I include my custom css file inside public/themes/flatly/css
    so it's working fine for me . But the master layout for flatly theme is inside root folder i.e Themes/Flatly/views/layouts/master.blade.php.

    Why the Themes folder is in gitignore ? I changed master layout and trying to git push but as it is ignoring. where should I exactly changed flatly layout ?

  • Global Moderator


    This is what you need:

    1. Place your custom.css in [root]/Themes/Flatty... not in [root]/public/themes/flatty
    2. publish theme assets php artisan asgard:publish:theme Flatty & php artisan view:clear
    3. Include your custom css in flatty published template via {!! Theme::style('css/custom.css') !!}

    Or you can simply put custom.css in published themes assets/css folder and include it then.

  • @armababy
    Thanks It's working now.

  • @armababy : thanks for your valuable answer... it also working for me :)

Log in to reply