Fixed admin theme not loading with custom admin url

This commit is contained in:
Jonathan Bertoldi 2021-03-04 16:58:42 -03:00
parent ee75f42c02
commit 4773747e01
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class ThemeViewFinder extends FileViewFinder
// Extract the $view and the $namespace parts
list($namespace, $view) = $this->parseNamespaceSegments($name);
if (request()->route() !== null && ! Str::contains(request()->route()->uri, 'admin/')) {
if (request()->route() !== null && ! Str::contains(request()->route()->uri, config('app.admin_url') . '/')) {
$paths = $this->addThemeNamespacePaths($namespace);
try {

View File

@ -43,7 +43,7 @@ class Themes
*/
public function __construct()
{
if (request()->route() !== null && Str::contains(request()->route()->uri, 'admin/')) {
if (request()->route() !== null && Str::contains(request()->route()->uri, config('app.admin_url') . '/')) {
$this->defaultThemeCode = Config::get('themes.admin-default', null);
} else {
$this->defaultThemeCode = Config::get('themes.default', null);