diff --git a/packages/framework/resources/views/layouts/styles.blade.php b/packages/framework/resources/views/layouts/styles.blade.php
index 497e524ae1b..2a345a4ce18 100644
--- a/packages/framework/resources/views/layouts/styles.blade.php
+++ b/packages/framework/resources/views/layouts/styles.blade.php
@@ -3,7 +3,7 @@
{{-- The compiled Tailwind/App styles --}}
@if(config('hyde.load_app_styles_from_cdn', false))
-
+
@elseif(Asset::hasMediaFile('app.css'))
@endif
diff --git a/packages/framework/tests/Unit/Views/StylesComponentViewTest.php b/packages/framework/tests/Unit/Views/StylesComponentViewTest.php
index bfe078d00f1..bb5358f9e08 100644
--- a/packages/framework/tests/Unit/Views/StylesComponentViewTest.php
+++ b/packages/framework/tests/Unit/Views/StylesComponentViewTest.php
@@ -5,7 +5,7 @@
namespace Hyde\Framework\Testing\Unit\Views;
use Hyde\Facades\Filesystem;
-use Hyde\Facades\Asset;
+use Hyde\Facades\HydeFront;
use Hyde\Hyde;
use Hyde\Support\Facades\Render;
use Hyde\Testing\TestCase;
@@ -80,7 +80,7 @@ public function testComponentRendersTailwindPlayCdnLinkWhenEnabledInConfig()
public function testComponentRendersAppCdnLinkWhenEnabledInConfig()
{
config(['hyde.load_app_styles_from_cdn' => true]);
- $this->assertStringContainsString(Asset::cdnLink('app.css'), $this->renderTestView());
+ $this->assertStringContainsString(HydeFront::cdnLink('app.css'), $this->renderTestView());
}
public function testComponentDoesNotRenderLinkToLocalAppCssWhenCdnLinkIsEnabledInConfig()
diff --git a/spec.md b/spec.md
index b404251e8ea..a1ca493ac41 100644
--- a/spec.md
+++ b/spec.md
@@ -15,7 +15,7 @@ For example: Consider these Blade snippets from the default views, showing commo
```blade
{{-- The compiled Tailwind/App styles --}}
@if(config('hyde.load_app_styles_from_cdn', false))
-
+
@elseif(Asset::hasMediaFile('app.css'))
@endif
@@ -61,7 +61,7 @@ protected function setSource(string $source): string {
### Asset Facade
```php
-Asset::cdnLink(string $file) // Gets remote URL to any file in /dist/ in the HydeFront version
+HydeFront::cdnLink(string $file) // Gets remote URL to any file in /dist/ in the HydeFront version
Asset::mediaLink(string $file) // Returns Hyde::mediaLink but with a cache buster
Asset::hasMediaFile(string $file) // Returns file_exists(Hyde::mediaPath($file))
@@ -576,7 +576,7 @@ $size = $logo->getSize();
$mimeType = $logo->getMimeType();
// HydeFront CDN link (for app.js or app.css)
-$appJsUrl = Asset::cdnLink('app.js');
+$appJsUrl = HydeFront::cdnLink('app.js');
```
This API maintains the simplicity-first approach of Hyde while providing power when needed. It should be intuitive for both Laravel-familiar developers and those new to the framework, aligning well with Hyde's philosophy and goals.