{"id":22342523,"url":"https://github.com/botble/laravel-assets","last_synced_at":"2025-04-06T06:06:39.238Z","repository":{"id":33183321,"uuid":"154250020","full_name":"botble/laravel-assets","owner":"botble","description":"Assets management for Laravel application","archived":false,"fork":false,"pushed_at":"2025-02-26T03:22:23.000Z","size":78,"stargazers_count":46,"open_issues_count":0,"forks_count":22,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T05:03:29.623Z","etag":null,"topics":["assets-management","botble","botblecms","laravel","laravel-5-package"],"latest_commit_sha":null,"homepage":"https://botble.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/botble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-23T02:36:23.000Z","updated_at":"2025-02-26T03:22:13.000Z","dependencies_parsed_at":"2025-01-15T15:13:23.788Z","dependency_job_id":null,"html_url":"https://github.com/botble/laravel-assets","commit_stats":{"total_commits":67,"total_committers":5,"mean_commits":13.4,"dds":0.05970149253731338,"last_synced_commit":"0e3748be2d8ce4182ded92d0b12e8fe670cbf18d"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botble%2Flaravel-assets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botble%2Flaravel-assets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botble%2Flaravel-assets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botble%2Flaravel-assets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botble","download_url":"https://codeload.github.com/botble/laravel-assets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441042,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assets-management","botble","botblecms","laravel","laravel-5-package"],"created_at":"2024-12-04T08:12:56.978Z","updated_at":"2025-04-06T06:06:39.214Z","avatar_url":"https://github.com/botble.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Assets management\n\n[![Latest Version](https://img.shields.io/github/release/botble/laravel-assets.svg?style=flat-square)](https://github.com/botble/laravel-assets/releases)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Quality Score](https://img.shields.io/scrutinizer/g/botble/laravel-assets.svg?style=flat-square)](https://scrutinizer-ci.com/g/botble/laravel-assets)\n[![StyleCI](https://styleci.io/repos/154250020/shield)](https://styleci.io/repos/154250020)\n[![Total Downloads](https://img.shields.io/packagist/dt/botble/assets.svg?style=flat-square)](https://packagist.org/packages/botble/assets)\n[![Maintainability](https://api.codeclimate.com/v1/badges/a6e4612307e3b3bf8252/maintainability)](https://codeclimate.com/github/botble/laravel-assets/maintainability)\n\n## Installation\n\n```bash\ncomposer require botble/assets\n```\n\nFor version \u003c= 5.4:\n\nAdd to section `providers` of `config/app.php`:\n\n```php\n// config/app.php\n'providers' =\u003e [\n    ...\n    Botble\\Assets\\Providers\\AssetsServiceProvider::class,\n];\n```\n\nAnd add to `aliases` section:\n\n```php\n// config/app.php\n'aliases' =\u003e [\n    ...\n    'Assets' =\u003e Botble\\Assets\\Facades\\AssetsFacade::class,\n];\n```\n\nAll assets resource will be manage in config file so we need to publish config to use.\n\n```bash\nphp artisan vendor:publish --provider=\"Botble\\Assets\\Providers\\AssetsServiceProvider\" --tag=config\n```\n\nAdd to your master layout view, in `head` tag:\n\n```php\n{!! \\Assets::renderHeader() !!}\n```\n\nand before `body` tag close:\n\n```php\n{!! \\Assets::renderFooter() !!}\n```\n\n## Methods\n\n### Add scripts\n\n```php\n\\Assets::addScripts(['key-of-assets-in-config-file']);\n```\n\nExample:\n\n```php\n\\Assets::addScripts(['app', 'bootstrap', 'jquery']);\n```\n\n### Add styles\n\n```php\n\\Assets::addStyles(['key-of-assets-in-config-file']);\n```\n\nExample:\n\n```php\n\\Assets::addStyles(['bootstrap', 'font-awesome']);\n```\n\n### Remove scripts\n\n```php\n\\Assets::removeScripts(['key-of-assets-in-config-file']);\n```\n\nExample:\n\n```php\n\\Assets::removeScripts(['bootstrap']);\n```\n\n### Remove styles\n\n```php\n\\Assets::removeStyles(['key-of-assets-in-config-file']);\n```\n\nExample:\n\n```php\n\\Assets::removeStyles(['font-awesome']);\n```\n\n### Others\n\n- Set version for assets. Add to `.env`\n\n```bash\nASSETS_VERSION=1.0\n```\n\nThen all assets will be added `?v=1.0`\n\n- Change to online mode\n\n```bash\nASSETS_OFFLINE=false\n```\n\nThen assets will be loaded from CDN if it's defined in config file.\n\n- To disable versioning:\n\n```bash\nASSETS_ENABLE_VERSION=false\n```\n\n## Contributors\n\n- [Sang Nguyen](https://github.com/sangnguyenplus)\n- [Dinh Quoc Han](https://github.com/dinhquochan)\n\n## License\n[MIT](LICENSE) © Sang Nguyen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotble%2Flaravel-assets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotble%2Flaravel-assets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotble%2Flaravel-assets/lists"}