Merge pull request #4707 from jayremias/patch-admin-theme

Fixed admin theme not loading with custom admin url
This commit is contained in:
Glenn Hermans 2021-03-05 06:23:02 +01:00 committed by GitHub
commit 6e7f235e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);