- How do I install iconify/json in a Laravel application?
- Install it with Composer using composer require iconify/json. It is a data-only package, so there is no service provider or config file to publish. You typically read the JSON from vendor/iconify/json or copy curated sets into resources/icons and load them with your own reader service.
- Does iconify/json support Laravel 10 and Laravel 11?
- Yes. It has no framework coupling and no PHP code dependency, so it works with Laravel 10, 11, and any PHP 8.1+ project. Compatibility is determined by your app's PHP version and your icon resolver, not by the package itself. Because it is JSON data, Laravel upgrades will not break it.
- Is iconify/json a PHP library or just icon data?
- It is a versioned data corpus, not a PHP library. It ships per-set JSON files containing icon metadata, aliases, and SVG path data, but contributes no PHP code, service provider, or facade. That means the resolver, caching, and fallback behavior are your responsibility.
- How do I render an Iconify icon in a Blade component?
- Build a small resolver that loads the set JSON and returns SVG path data, then wrap it in a Blade component such as <x-icon name="mdi:home" />. Since the package provides data only, the component, cache layer, and fallback for missing icons are yours to implement. The recommended pattern is a thin IconifyRepository service behind a Cache-backed resolver.
- Can I use iconify/json without calling the Iconify API?
- Yes, that is the main benefit. All icon data is bundled locally as JSON, so rendering works offline and adds no third-party network hop on the render path. You can also vendor only the two to four sets you actually need under resources/icons instead of shipping the full corpus.
- How do I search for an icon across all Iconify sets?
- Load the collections metadata and per-set JSON, then filter by icon name, set prefix, or tags inside your own repository class. The package does not include a search API or query layer. For performance, index icon names at build time or cache search results rather than scanning the full corpus on every request.
- What license applies to icons in iconify/json?
- Licenses vary per set and include MIT, Apache-2.0, CC-BY-4.0, and some GPL or CC-BY-SA sets. A per-set license audit is mandatory before shipping, and attribution may be required in your product. Do not ship GPL sets into a proprietary product without explicit approval.
- How often is iconify/json updated, and how should I maintain it?
- Upstream updates several times a week. Pin the version, review upgrades on a schedule such as monthly, and automate the diff as a bot-opened pull request. Prefixes can be renamed or deprecated upstream, so treat prefix:name as a soft reference in your configuration.
- What is the deployment impact of bundling all icon sets?
- The full corpus is large and can inflate build images and slow cold deploys. Set-level curation is an architectural decision, not a minor optimization. Commit only the sets you actually use, or read them from a configured filesystem path outside the deploy artifact.
- What are alternatives to iconify/json for Laravel icons?
- You can consume a Composer wrapper such as blade-icons with an Iconify driver, vendor the JSON and write a thin reader service yourself, or fetch icons from the Iconify API at runtime. The wrapper path is fastest and lowest-ownership, while the thin-reader path gives more control. Runtime API fetching is acceptable only for low-traffic or admin surfaces.