Skip to content
İsa Eken edited this page Oct 2, 2021 · 1 revision

Welcome to the laravel-theme-system wiki!

Installation

Run composer require isaeken/laravel-theme-system in your laravel project root.

Then publish service provider and config file using php artisan vendor:publish --provider="IsaEken\ThemeSystem\ThemeSystemServiceProvider" --tag="theme-system-config"

Basic Usage

Call the theme_system()->setTheme('your-theme-name') method in your Controller or Middleware for change the theme.

Note: default is reserved. You can use "default" or null change to theme for default Laravel views.

You can get current theme name using theme_system()->getCurrentTheme()

Note: theme names are the same as folder names and can only contain "a-z A-Z 0-9 - _" characters by default.

Creating theme

Create your theme's folder as your theme's name. Theme root folder is set to default "/resources/themes".

Copy and edit your default views to your theme directory.

Clone this wiki locally