- How do I install smorken/frontend-assets in a Laravel app?
- The package is Bitbucket-hosted rather than distributed on Packagist, so you add a Composer VCS repository entry pointing to the Bitbucket URL and require it at a pinned commit reference. Laravel package auto-discovery should register the service provider automatically. Your local machine and CI environment will need credentials with Bitbucket read access.
- Does smorken/frontend-assets work with Laravel 10 or 11?
- The package is a thin service provider that registers Blade macros, so it may work if its composer.json constraints allow your Laravel and PHP versions. However, it is unmaintained and its declared constraints may target older releases such as Laravel 5.x or 6.x, which can break provider or macro registration. Check the constraint matrix before adopting and run a smoke test that renders the macros. If it fails, forking the small provider or replacing the macro calls with literal tags is usually faster than patching.
- What Blade macros does this package actually provide?
- It registers Blade macros that emit Bootstrap CSS link tags and JavaScript script tags pointing at a CDN. There is no asset pipeline, no compilation step, no runtime service logic, and no data model. The functional surface is essentially a single service provider plus a handful of macro closures.
- Does it support Vite or Laravel Mix asset bundling?
- No. The package is a view-layer convenience for CDN-hosted Bootstrap assets and does not compile, bundle, version, or cache local assets. If your application already uses Vite, Laravel Mix, or Webpack, keep those and treat this package as redundant. It should not be positioned or evaluated as an asset bundler.
- Can I self-host Bootstrap instead of using the CDN with this package?
- The package is built around emitting third-party CDN URLs, and there is no documented local or self-hosted fallback. For air-gapped, privacy-sensitive, GDPR-conscious, or strict Content-Security-Policy environments, replace the macro calls with literal link and script tags pointing at your own built assets. That exit is a sub-day change, which also shows how little the dependency buys you.
- Does smorken/frontend-assets emit Subresource Integrity hashes for Bootstrap?
- Whether SRI hashes are emitted is an open question and depends on how the Bootstrap version is hardcoded in the macro closures. If hashes are present and the pinned CDN version drifts, a mismatch can silently break styling. Verify the rendered markup in a smoke test before relying on it in production, or add integrity attributes yourself in your own Blade component.
- Is smorken/frontend-assets maintained and safe to depend on?
- It has a single maintainer, no visible stars, dependents, or issue traffic, and is Bitbucket-hosted rather than distributed through Packagist. There is no evidence of a test suite, CI configuration, security review, or clear license from repository metadata, which is a blocker for many legal reviews. For a feature achievable with two inline HTML tags, that supply-chain risk is hard to justify.
- How do I test that the Bootstrap macros render the correct tags?
- Add a small Blade or feature test that renders a view calling the macro and asserts the output contains the expected link and script tags with the correct Bootstrap version and CDN URLs. Since there is no known test suite in the package itself, your own smoke test is the only guarantee. This also catches SRI hash or CDN URL drift after Laravel and PHP upgrades.
- Can I configure which Bootstrap version the macros use?
- Whether the Bootstrap version is configurable is an open question; if versions are hardcoded, they will go stale and may eventually 404 or drift from the version your app documents. Inspect the provider and macro source for a config file or environment variable, and check whether a config file is publishable. If none exists, fork the package or replace the macro invocations with literal markup you control.
- What are alternatives to smorken/frontend-assets?
- The simplest alternative is two literal link and script tags in layouts/app.blade.php, or a small in-house Blade component for Bootstrap assets that you own and can version. If you need bundling, versioning, and SRI, use Vite or Laravel Mix with a locally built Bootstrap and your own integrity attributes. Dedicated Laravel asset packages exist, but this package only saves a few lines of markup at the cost of an unmaintained dependency.