added theme support
This commit is contained in:
@@ -14,7 +14,11 @@ final class Stylist
|
||||
{
|
||||
$requested = $this->resolver->resolve($context);
|
||||
try {
|
||||
return $this->loader->find($requested);
|
||||
$theme = $this->loader->find($requested);
|
||||
if ($context !== null && $theme->type() !== $context) {
|
||||
throw ThemeNotFoundException::forKey($requested);
|
||||
}
|
||||
return $theme;
|
||||
} catch (ThemeNotFoundException) {
|
||||
$fallback = $context === 'frontend'
|
||||
? (string) config('stylist.default_frontend_theme', 'sonardesk')
|
||||
|
||||
Reference in New Issue
Block a user