aldrumo / theme-manager
Laravel based Theme manager for your application
0.5.0
2022-08-28 13:48 UTC
Requires
- php: ^7.3|^8.0
- aldrumo/support: ^0.2
- illuminate/support: ^8.0|^9.0
- livewire/livewire: ^2.0
Requires (Dev)
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-10-28 19:13:51 UTC
README
A laravel theme package
ThemeManager
$themeCollection = resolve(\Aldrumo\ThemeManager\ThemeManager::class)->availableThemes();
resolve(\Aldrumo\ThemeManager\ThemeManager::class)->activeTheme('ThemeName');
// throws \Aldrumo\ThemeManager\Exceptions\ActiveThemeNotSetException resolve(\Aldrumo\ThemeManager\ThemeManager::class)->activeTheme();
// throws \Aldrumo\ThemeManager\Exceptions\ThemeNotFoundException resolve(\Aldrumo\ThemeManager\ThemeManager::class)->activeTheme('MissingTheme');
resolve(\Aldrumo\ThemeManager\ThemeManager::class)->activeTheme('ThemeName'); $themeBase = resolve(\Aldrumo\ThemeManager\ThemeManager::class)->activeTheme();
// runs uninstall on OldTheme ThemeBase file // runs install on NewTheme ThemeBase file // runs activeTheme for NewTheme resolve(\Aldrumo\ThemeManager\ThemeManager::class)->installTheme('NewTheme', 'OldTheme');
ThemeBase
$themeBase = resolve(\Aldrumo\ThemeManager\ThemeManager::class)->activeTheme(); $viewsCollection = $themeBase->availableViews();
$themeBase = resolve(\Aldrumo\ThemeManager\ThemeManager::class)->activeTheme(); $themeBase->install(); $themeBase->uninstall();