-
-
Save allanfreitas/8425b2e787d2b1303e03911d3f69ed62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // app/Http/Middleware/AssetUrls.js | |
| // Middle where to load mix-manifest.json | |
| // file Laravel Mix generates | |
| class AssetUrls { | |
| * handle (request, response, next) { | |
| const View = use('View') | |
| View.global('assetUrls', function () { | |
| return require('../../../public/mix-manifest.json') | |
| }) | |
| yield next | |
| } | |
| } | |
| module.exports = AssetUrls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <link href="{{ assetUrls()['/css/admin.css'] }}" rel='stylesheet' type='text/css'> | |
| </head> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment