@@ -77,7 +77,7 @@ public function getPath(string $path = null): string
77
77
*/
78
78
public function getAssetsPath (string $ path = null ): string
79
79
{
80
- return config ('themes-manager.symlink_path ' , 'themes ' ) . DIRECTORY_SEPARATOR . mb_strtolower ($ this ->getName ()) . DIRECTORY_SEPARATOR . $ this ->cleanPath ($ path );
80
+ return Config:: get ('themes-manager.symlink_path ' , 'themes ' ) . DIRECTORY_SEPARATOR . mb_strtolower ($ this ->getName ()) . DIRECTORY_SEPARATOR . $ this ->cleanPath ($ path );
81
81
}
82
82
83
83
/**
@@ -237,22 +237,22 @@ public function url($url, $absolutePath = false): ?string
237
237
238
238
// Lookup asset in current's theme assets path
239
239
$ fullUrl = rtrim ((empty ($ this ->getAssetsPath ()) ? '' : DIRECTORY_SEPARATOR ) . $ this ->getAssetsPath ($ url ), DIRECTORY_SEPARATOR );
240
- if (file_exists (public_path ($ fullUrl ))) {
241
- $ fullUrl = str_replace ('\\' , '/ ' , $ fullUrl );
242
- return $ absolutePath ? asset ('' ) . ltrim ( $ fullUrl, ' / ' ) : ltrim ( $ fullUrl, ' / ' ) ;
240
+ if (File:: exists (public_path ($ fullUrl ))) {
241
+ $ fullUrl = ltrim ( str_replace ('\\' , '/ ' , $ fullUrl), ' / ' );
242
+ return $ absolutePath ? asset ('' ) . $ fullUrl : $ fullUrl ;
243
243
}
244
244
245
245
// If not found then lookup in parent's theme assets path
246
246
if ($ parentTheme = $ this ->getParent ()) {
247
247
return $ parentTheme ->url ($ url , $ absolutePath );
248
248
} else { // No parent theme? Lookup in the public folder.
249
- if (file_exists (public_path ($ url ))) {
250
- $ url = ltrim (str_replace ('\\' , '/ ' , $ url ));
251
- return $ absolutePath ? asset ('' ) . ltrim ( $ url, ' / ' ) : ltrim ( $ url, ' / ' ) ;
249
+ if (File:: exists (public_path ($ url ))) {
250
+ $ url = ltrim (str_replace ('\\' , '/ ' , $ url ), ' / ' );
251
+ return $ absolutePath ? asset ('' ) . $ url : $ url ;
252
252
}
253
253
}
254
254
255
- \Log::warning ("Asset not found [ {$ url }] in Theme [ {$ this ->getName ()}] " );
255
+ \Log::warning ("Asset [ {$ url }] not found for Theme [ {$ this ->getName ()}] " );
256
256
257
257
return ltrim (str_replace ('\\' , '/ ' , $ url ));
258
258
}
0 commit comments