Skip to content

v0.41.0-beta - 2022-06-24 - Improve the AssetService

Compare
Choose a tag to compare
@caendesilva caendesilva released this 24 Jun 09:41
· 1140 commits to master since this release
abcb616

About

This release refactors and improves the Asset Service, adding auto-configuration features and a new Asset facade.

Using the Asset facade in Blade views

Instead of the long syntax Hyde::assetManager() you can now use the Asset facade directly. See this example, which both do the exact same thing using the same underlying service:

Hyde::assetManager()->hasMediaFile('app.css')
Asset::hasMediaFile('app.css')

If you don't know what any of this means, good news! You don't have to worry about it. Hyde's got your back.

Added

  • Added feature to dynamically load hyde.css and hyde.js if they exist locally
  • Added the Asset facade to be used instead of Hyde::assetManager()
  • Added the Asset facade as a class alias to config/app.css

Changed

  • Changed scripts.blade.php and styles.blade.php to use the Asset facade

Deprecated

  • Deprecated AssetManager.php (Hyde::assetManager()). Use the Asset facade instead

What's Changed

  • Fix bug where Hyde::docsIndexPath() checks the hard-coded source directory by @caendesilva in #551

Full Changelog: v0.40.0-beta...v0.41.0-beta