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

Cms Assets Laravel Package

craftcms/cms-assets

View on GitHub
Deep Wiki
Context7

Built assets for Craft CMS - This is a subtree split and compiled assets of craftcms/cms

Frequently asked questions about Cms Assets
Can I use craftcms/cms-assets in a pure Laravel project without Craft CMS?
Yes, but with limitations. The package provides static assets (CSS/JS) that can be published to Laravel’s public folder. However, if your project relies on Craft CMS-specific features like Twig templates or control panel integrations, you’ll need additional wrappers (e.g., spatie/laravel-twig) to bridge the gap. It’s best suited for projects with existing Craft CMS dependencies or legacy integrations.
How do I install and publish these assets to Laravel’s public folder?
Run `composer require craftcms/cms-assets` to install. Then, publish the assets by adding a `publishes` entry in your `config/app.php` or a service provider, mapping the `dist` folder to `public_path('vendor/craft/assets')`. Finally, update your Blade views to reference assets using Laravel’s `asset()` helper, e.g., `{{ asset('vendor/craft/assets/control-panel.css') }}`.
Will this package conflict with Laravel Mix or Vite?
Yes, if not configured properly. Since the package provides pre-compiled assets, you should exclude its files from Laravel’s build process by adding it to `webpack.mix.exclude` or `vite.config.js`. This prevents duplicate processing and ensures the static assets remain untouched. Always test your build pipeline after integration.
Does this package support Laravel 10+ and modern asset pipelines?
The package itself is static assets, so it’s technically compatible with any Laravel version. However, its lack of maintenance and activity suggests it may not align with modern Laravel asset pipelines (like Vite or Laravel Mix). You’ll need to manually handle asset versioning, caching, and CDN delivery, which may require custom middleware or configuration.
Are there any security risks using this package in production?
The primary risk stems from the package’s lack of maintenance. Since it’s a subtree-split of Craft CMS assets, you should monitor Craft CMS for security patches affecting these assets. Isolate the assets in a vendor-specific directory (e.g., `public/vendor/craft/`) and avoid exposing them directly to public routes. Regularly audit dependencies for vulnerabilities.
How do I handle asset versioning and caching in Laravel?
Lock the package version in your `composer.json` to avoid unexpected updates. Use Laravel’s `asset()` helper with hashed filenames (e.g., `control-panel.css?id=1234`) for cache busting. If serving via CDN, configure proper cache headers and invalidation rules. Avoid hardcoding asset paths in your templates to ensure flexibility during updates.
Can I use these assets in a Craft CMS plugin for Laravel?
Yes, if your plugin requires Craft CMS-specific assets (e.g., control panel JS/CSS) but is deployed in a Laravel environment. Publish the assets as described earlier and ensure your plugin’s asset paths are configured to resolve correctly in Laravel’s context. Test thoroughly, as Craft CMS and Laravel may handle asset paths differently.
What alternatives exist for managing assets in Laravel?
For pure Laravel projects, use Laravel Mix (Webpack) or Vite for dynamic asset compilation, which integrates seamlessly with Laravel’s ecosystem. If you need Craft CMS assets, consider using Craft’s native asset pipeline or a dedicated Craft CMS plugin. This package is a niche solution for hybrid setups where Craft CMS assets must coexist with Laravel.
How do I test this package in a Laravel project before production?
Start by installing the package in a staging environment and publishing the assets. Test asset loading in Blade views, ensure no conflicts with Laravel’s build tools, and verify caching behavior. Use tools like Laravel’s `asset()` helper to confirm paths resolve correctly. Manually test edge cases like asset updates or CDN delivery to catch integration issues early.
Who maintains this package, and how often is it updated?
The package appears unmaintained, as indicated by its lack of stars or recent activity. It’s a subtree-split of Craft CMS assets, so updates depend on Craft CMS releases. For long-term reliability, consider forking the package or wrapping its assets in a custom Laravel package with your own maintenance cycle. Always check the Craft CMS roadmap for breaking changes.
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.
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
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle