fxcjahid / laravel-assets-manager
There is no license information available for the latest version (1.2) of this package.
Easy css and js resource management in Laravel
1.2
2024-09-22 15:58 UTC
Requires
- php: ^8.0
README
Easy css and js resource management in Laravel
Install
- Install package
composer require fxcjahid/laravel-assets-manager
- Add provider in
config/app.php
Fxcjahid\LaravelAssetsManager\Providers\AssetsManagerServiceProvider::class, Fxcjahid\LaravelAssetsManager\Providers\AssetsBladeServiceProvider::class,
Usage
config for assets example:
<?php return [ /* |-------------------------------------------------------------------------- | Define which assets will be available through the asset manager | These assets are registered on the asset manager. |-------------------------------------------------------------------------- */ 'all_assets' => [ 'admin.media.css' => ['Cdn' => 'media:admin/css/media.css'], 'admin.product.css' => ['Cdn' => 'media:admin/css/media.css'], 'admin.media.js' => ['Cdn' => 'media:admin/js/media.js'], 'admin.product.js' => ['Cdn' => 'media:admin/js/media.js'], ], /* |-------------------------------------------------------------------------- | Define which default assets will always be included in all pages | through the asset pipeline. |-------------------------------------------------------------------------- */ 'required_assets' => [], ];
In your main blade file
@assetsCss()
@assetsJS()