Support the ongoing development of Laravel.io →
Configuration Architecture
Last updated 1 year ago.
0

Laravel does not support themes out of the box. you can create bootstrap themes though. which maybe used in laravel views in turn.

0

Hi Astroanu,

Thanks for your reply, I just wanted to know what would be the structure of the theme folder?

0

take a look at a package like https://github.com/igaster/laravel-theme. how they have implemented themes.

basically if you look at how others have done it, wordpress themes have a default set of views and they can be overridden by a child theme. so in your laravel project have your resources/views be your default theme and override them with themes/mytheme/views. for this you will obviously need a ThemeServiceProvider and a couple of facades to resolve the correct view and attach the correct js, css or any other asset file.

i suggest the following directory structure for themes

resources
    views
        layouts
            auth.blade.php
themes
    mytheme
        views
            layouts
                auth.blade.php
            dashboard
                home.blade.php
        assets
            css
                style.css
Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.