- How do I install ryangjchandler/laravel-bunny-fonts in a Laravel application?
- Install it with Composer using composer require ryangjchandler/laravel-bunny-fonts. The service provider is registered through Laravel package auto-discovery, so no manual provider registration is needed. Optionally publish the package config file with php artisan vendor:publish to register your font families. There are no migrations, scheduled jobs, or required environment variables beyond an optional CDN base URL override.
- Which Laravel versions does laravel-bunny-fonts support?
- Version 2.1.1 widened the illuminate/support constraint to cover Laravel 10 through 13. Because that widening landed in a patch release, it is worth checking the resolved constraint in your composer.lock rather than assuming. Also confirm that Laravel 13 is covered by the package's CI test matrix and PHP version constraints, not just declared in composer.json. If you pin tightly, run composer why illuminate/support to verify no transitive dependency was force-upgraded.
- Is Bunny Fonts GDPR-friendly compared to Google Fonts?
- Bunny Fonts is a privacy-friendly, Google Fonts-compatible CDN that does not serve Google tracking, so it typically removes the need for a Google Fonts cookie banner. However, it is still a third-party request in your render path unless you enable local caching or self-hosting. If you need a strict offline-asset or no-third-party posture, verify whether the package's local caching mode satisfies your requirements before relying on it.
- How do I register font families in the laravel-bunny-fonts config file?
- Publish the package config and declare each family with its weights and styles there; the package turns those entries into Bunny Fonts stylesheet links. You then render them in Blade using the package's helper or directive instead of hard-coding fonts.bunny.net link tags. For a multi-brand or multi-locale front end, expect roughly half a day to roll the config out consistently across layouts. Remove any leftover fonts.googleapis.com links and CSS @import statements as part of the same change.
- Does laravel-bunny-fonts support local caching or self-hosting of font files?
- The package supports local caching of font assets depending on configuration, which lets you avoid a third-party request on every page render. That mode is the one to evaluate if you need a strict GDPR or offline-asset posture. Check the published config and README for the exact caching options and confirm how cache warming fits into your deploy pipeline. Without caching enabled, typography depends on the Bunny Fonts CDN being reachable.
- Does laravel-bunny-fonts work with Vite and the Laravel asset pipeline?
- Yes. The package sits alongside Laravel Vite and asset pipeline concerns rather than competing with them, and it does not require Inertia, Livewire, or a specific front-end build tool. It simply emits stylesheet link tags for your Blade-rendered views. If your team already self-hosts webfonts through Vite, the package is redundant rather than harmful.
- What Content-Security-Policy changes are needed when switching from Google Fonts to Bunny Fonts?
- Remove the fonts.googleapis.com and fonts.gstatic.com allowances from your CSP and add the Bunny Fonts domains instead. You will need fonts.bunny.net for the CSS endpoint plus the host that serves the font files, so inspect a rendered page or the Bunny Fonts documentation to confirm the exact file host. If you enable local caching, the font requests may become same-origin and the CSP entry can be tightened accordingly. Test the policy in report-only mode first to catch any missed directives.
- Is laravel-bunny-fonts safe to use in production?
- Overall technical risk is low: it is a small, additive package that does not touch the container, routing, auth, queues, or persistence. The main caveats are an external CDN dependency in the render path and single-maintainer long-term risk. Latency or an outage at Bunny Fonts degrades typography but not application functionality. Enable local caching or self-hosting if you need to remove that external dependency from page rendering.
- Can I use laravel-bunny-fonts in an API-only Laravel application?
- It is a poor fit for API-only services with no server-rendered HTML, because its entire purpose is emitting font stylesheet links into Blade views. The same applies to any application whose fonts are handled entirely by a separate front-end build. In those cases the package adds a dependency without providing value.
- How do I test that Bunny Fonts are rendering correctly in my Laravel views?
- Assert in a feature test that your response contains the expected fonts.bunny.net stylesheet link for each configured family. If you use local caching, add a test or deploy check that the cached assets exist and are served. You can also run a quick smoke check in the browser to confirm the CSS resolves and the font files load. Keep in mind that tests hitting the live CDN are flaky, so prefer asserting on markup and cached files.