In ‘setup.php’, we have this portion of code defining the possible paths a blade template can have:
$viewPaths = collect(preg_replace('%[\/]?(resources/views)?[\/.]*?$%', '', [STYLESHEETPATH, TEMPLATEPATH]))
->flatMap(function ($path) {
return ["{$path}/resources/views", $path];
})->unique()->toArray();
Which returns an array:
array (
0 => '.../sage/resources/views',
1 => '.../sage',
2 => '.../sage/resources/resources/views',
3 => '.../sage/resources',
)
The thing is, two of the four items are the actual STYLESHEETPATH
and TEMPLATEPATH
(and one of them doesn’t even exist).
I get that maybe is useful having the theme root .../sage
there as well, but wouldn’t it suffice to just use an array composed by [STYLESHEETPATH, TEMPLATEPATH]
?
Thanks
Edit: I don’t even know why STYLESHEETPATH
is returning the path with ‘/views’, but I’m currently ignoring that.