Download the PHP package leuverink/asset-injector without Composer
On this page you can find all versions of the php package leuverink/asset-injector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download leuverink/asset-injector
More information about leuverink/asset-injector
Files in leuverink/asset-injector
Download leuverink/asset-injector
More information about leuverink/asset-injector
Files in leuverink/asset-injector
Vendor leuverink
Package asset-injector
Short Description Automatically inject your package assets onto the page
License MIT
Package asset-injector
Short Description Automatically inject your package assets onto the page
License MIT
Please rate this library. Is it a good library?
Informations about the package asset-injector
Auto Inject Package Assets
Simplify your Laravel package development with automatic asset injection.
This package allows you to seamlessly insert JavaScript and CSS into web responses without requiring manual inclusion by your package users 🚀
Installation
Install the package via Composer:
Usage
-
After installing, you'll need to create a
AssetInjector
implementation. - Register the implementation in your package's Service Provider.
How It Works
- Assets are automatically included in full-page responses (not partial HTML responses).
- If a
<head>
tag is present, assets are injected there. Otherwise, they're inserted before the closing</html>
tag. - The
identifier()
method helps prevent duplicate asset injection. - Use the
enabled()
method to implement conditional asset injection based on your package's configuration. - Customize the injected content by modifying the
inject()
method.
Development
Use these commands for development:
License
This package is open-source software licensed under the MIT license.
All versions of asset-injector with dependencies
PHP Build Version
Package Version
The package leuverink/asset-injector contains the following files
Loading the files please wait ....