Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Assets Laravel Package

botble/assets

Botble Assets is a Laravel package for managing frontend assets in Botble CMS projects. It helps register, organize, version, and render CSS and JavaScript files from themes and plugins, simplifying asset publishing and dependency handling.

View on GitHub
Deep Wiki
Context7

Botble Assets is a Laravel package that provides a fluent asset management layer for registering, enqueueing, and rendering CSS and JavaScript files. Inspired by WordPress's enqueue system, it lets themes, plugins, and packages add assets to named positions, resolve dependencies, and output them through Blade directives—keeping your layouts clean and load order predictable.

  • Register and enqueue CSS/JS from PHP with a fluent API
  • Blade directives for rendering assets in header and footer positions
  • Dependency-aware ordering for scripts and styles
  • Inline assets, versioning, and per-asset attributes support
  • Integrates with themes, plugins, and packages without touching templates
Frequently asked questions about Assets
What is botble/assets used for in Laravel?
Botble Assets is a Laravel package for registering, managing, and rendering CSS and JavaScript assets at runtime. It provides asset containers, dependency handling, versioning, localization, and minified output so themes and plugins can contribute assets without editing a central layout. It is the asset-management layer used by the Botble CMS ecosystem.
How do I install botble/assets with Composer?
Install it with composer require botble/assets and rely on Laravel package auto-discovery for the service provider and facade, then publish any config the README documents. Because the package is primarily exercised inside Botble CMS, check its composer.json constraints before installing into your app. A quick Blade render that outputs one registered style and script will confirm the pipeline works.
Which Laravel and PHP versions does botble/assets support?
The package does not publish an obvious standalone support matrix in the overview, so read its composer.json constraints and repository CI configuration before committing. Asset packages are tightly coupled to Laravel majors and front-end tooling, so confirm the exact PHP and Laravel versions you need are allowed. A short install spike against your target versions is the fastest way to validate compatibility.
Can I use botble/assets in a plain Laravel app without Botble CMS?
It is a Laravel package and may run standalone, but its primary consumer is Botble core, so it may assume sibling botble packages, specific config keys, or a particular public asset directory convention. Check for runtime dependencies on other botble/* packages and test a minimal install before adopting it. For a conventional Laravel app already standardized on Vite, the marginal benefit is likely low.
How does botble/assets handle CSS and JavaScript dependencies?
The package provides asset containers and dependency handling so styles and scripts can declare relationships and render in the correct order. This is useful when themes and plugins register assets independently at runtime rather than from one central manifest. Verify the exact dependency API and whether circular dependencies are detected by reading the README or source.
Does botble/assets support cache busting and asset versioning?
Versioning is listed as part of the package's asset-management feature set, which is typically used to append a version query string or path segment for cache busting. The overview does not detail how versions are invalidated on deploy, so confirm the documented mechanism and test it behind your CDN and proxy setup. Asset URL generation, CDN prefixes, and minification are common production-only failure points.
Does botble/assets work with Vite, Laravel Mix, or both?
The overview does not specify whether the package targets Vite, Mix, or both, and its minify pipeline may overlap with either front-end toolchain. Confirm whether you can disable its minifier and use your own build output, and whether it can resolve Vite manifest URLs. If your app is already standardized on laravel-vite-plugin, adopting a second asset registry needs a clear reason such as plugin-contributed assets.
How do I reset the botble/assets registry between tests?
The package uses a facade over global asset state, so test isolation depends on a reset or flush hook. The overview does not confirm that such a helper exists, so inspect the source for a clear or reset method and wrap asset registration in your test case teardown. If no hook is available, isolate tests that assert rendered asset output or add a small reset helper yourself.
Is botble/assets a good alternative to laravel-vite-plugin?
Only if you genuinely need runtime asset registration from themes or plugins, as in Botble CMS or a marketplace-style extension system. For a standard Laravel app with a Vite build, laravel-vite-plugin is first-party, better documented, and has stronger community support. Botble Assets has thin public adoption, so treat it as a containable MIT-licensed dependency rather than a drop-in Vite replacement.
Is botble/assets actively maintained and safe for production?
Public adoption is thin, with a small star count and few recorded dependents, and the primary consumer appears to be Botble's own product. Verify actual commit activity and tag history on the repository rather than assuming active maintenance from release dates. The MIT license and small, auditable codebase make vendoring or forking a realistic fallback if the project stalls.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment