diff --git a/packages/framework/src/Support/Includes.php b/packages/framework/src/Support/Includes.php index 34179ebf394..125ea80b484 100644 --- a/packages/framework/src/Support/Includes.php +++ b/packages/framework/src/Support/Includes.php @@ -67,7 +67,7 @@ public static function get(string $filename, ?string $default = null): ?string */ public static function html(string $filename, ?string $default = null): ?HtmlString { - return static::getInclude([static::class, 'renderHtml'], '.html', $default, $filename); + return static::getInclude([static::class, 'renderHtml'], $filename, $default, '.html'); } /** @@ -79,7 +79,7 @@ public static function html(string $filename, ?string $default = null): ?HtmlStr */ public static function blade(string $filename, ?string $default = null): ?HtmlString { - return static::getInclude([static::class, 'renderBlade'], '.blade.php', $default, $filename); + return static::getInclude([static::class, 'renderBlade'], $filename, $default, '.blade.php'); } /** @@ -91,10 +91,10 @@ public static function blade(string $filename, ?string $default = null): ?HtmlSt */ public static function markdown(string $filename, ?string $default = null): ?HtmlString { - return static::getInclude([static::class, 'renderMarkdown'], '.md', $default, $filename); + return static::getInclude([static::class, 'renderMarkdown'], $filename, $default, '.md'); } - protected static function getInclude(callable $method, string $extension, ?string $default, string $filename): ?HtmlString + protected static function getInclude(callable $method, string $filename, ?string $default, string $extension): ?HtmlString { $path = static::normalizePath($filename, $extension); $contents = static::getFileContents(static::path($path));