infinety-es / temply-theme-manager
A Laravel Nova tool.
Package info
github.com/Krato/TemplyThemeManager
Language:Vue
pkg:composer/infinety-es/temply-theme-manager
dev-master
2019-01-25 11:35 UTC
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2026-02-26 03:18:38 UTC
README
Instructions
-
Install Package
composer require infinety-es/temply-theme-manager -
Config temply.php should have this config:
'model_theme' => App\Theme::class, // Theme Model Class 'model_palette' => App\Palette::class, // Palette Model Class
-
User model should have this attributes:
public function getCurrentThemeAttribute() { return \App\Theme::first(); } public function getCurrentPaletteAttribute() { return \App\Palette::first(); }
-
Add a Listener in EventServiceProvider.php
'Infinety\TemplyThemeManager\Events\ThemeActivated' => [ 'App\Listeners\YourListener', ],
There are two public properties: Theme and Palette. You can access through: $event->theme or $event->palette.