infinety-es / temply-theme-manager
A Laravel Nova tool.
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Language:Vue
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-10-26 00:09:06 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
.