pdima88 / phpassets
Small asset manager for PHP
Installs: 38
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/pdima88/phpassets
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2025-09-23 20:09:04 UTC
README
Small asset manager for PHP
Usage:
Use add static method to include assets you need
use pdima88\phpassets\Assets; ... Assets::add('bootstrap'); // include asset library, defined in Assets::$libs Assets::add('css/main.css'); // include single css file Assets::add('js/script.js'); // include single js file // or all at once: Assets::add([ 'bootstrap', 'css/main.js', 'js/script.js' ]);
Output js and css tags in template
Assets::getCss(); // put this inside <head> ... </head> to output styles tags Assets::getJs(); // put this in the end of page before </body> to output js script tags