- How do I install ibrand/setting in a Laravel application?
- Install it with composer require ibrand/setting, then make sure the package service provider is registered (Laravel 5.5+ auto-discovery handles this) and add the facade alias if you want the static API. The package ships a settings migration that you publish and run to create its key-value table. After that you can read and write settings through the facade or the global setting() helper. Because the last release targets the Laravel 5.x era, confirm Composer can actually resolve it against your framework version before relying on the install.
- Does ibrand/setting support Laravel 10, 11 or 12?
- Not officially. Its last release was 2018-12-17, which places it in the Laravel 5.5 to 5.7 and PHP 7.1 to 7.3 era, and its illuminate/* constraints will typically block installation on a modern LTS. To run it on Laravel 10, 11 or 12 you would fork it, relax the version pins, replace removed helpers, and re-run its test suite. The codebase is only a handful of classes, so that fork is usually a day of work rather than a rewrite.
- How do I read and write settings with ibrand/setting?
- The package exposes a small key-value API: get a value by key, set a value by key, and forget a key to remove it, through the facade or the global setting() helper. Reads come from the database, plus cache where configured, and writes hit the settings table. That makes it a reasonable fit for admin-editable feature flags, storefront copy and payment gateway toggles that are read on most requests and written rarely. Avoid calling set() on hot request paths.
- Does ibrand/setting cache settings, and does set() clear the cache?
- The package is described as a database and cache settings store, so reads may be cached, but you must verify in its source whether set() invalidates that cache and whether invalidation is process-local. A per-process static cache will leave queue workers and sibling web nodes serving stale values after an admin change. If your production cache driver supports tags, wrap reads in tagged keys; otherwise use a short TTL or clear the cache on every write. Treat cache coherence as the main behavioural risk of this package.
- Can ibrand/setting handle per-tenant or per-user settings?
- No. It is a global key-value store, and per-tenant or per-user scoping is unlikely to be first-class. Multi-tenant products need settings rows keyed by tenant, team or user, which means either extending the table and queries yourself or choosing a package designed for scoped settings. If multi-tenancy is on your roadmap, this package is the wrong foundation.
- What are the alternatives to ibrand/setting for Laravel settings?
- The standard maintained option is spatie/laravel-settings, which offers typed settings classes, current Laravel support and cache awareness. Other routes are a hand-rolled settings table behind a small repository class, or config-as-code if settings rarely change. Because ibrand/setting's feature set is so narrow, reimplementing it costs roughly the same as integrating it. Benchmark against spatie before adopting.
- Is ibrand/setting still maintained and safe for production?
- It has not been updated since December 2018, has very low adoption (around nine stars and no dependents), and therefore receives no security patches or PHP 8.x deprecation fixes. Its MIT license does permit forking, so the risk is governance and ownership rather than legality. Adopting it means your team owns the code, the Composer constraints and any future CVE triage. For a long-lived Laravel LTS application that is usually a poor trade against a maintained package.
- How does ibrand/setting serialize setting values?
- Most packages from this era store loosely serialized values rather than typed ones, so confirm the exact encoding in the source before you migrate data. If legacy rows hold PHP-serialized payloads, you will need a migration to JSON or plain strings plus hardening around unserialize(). If any setting value can originate from user input, unserialize is a security finding, not just a data-format detail. There are no typed getters or schema validation built in, so casting is your responsibility.
- Will ibrand/setting's setting() helper or settings table conflict with my code?
- Possibly. A global setting() helper and a generic settings table name can collide with existing application code or with another settings package such as spatie/laravel-settings if both are ever installed. Check your codebase and Composer lock file for an existing helper function or table of the same name before installing. If a collision exists, rename the helper binding or the table in a fork.
- How do I test a Laravel app that uses ibrand/setting?
- Run the package migration in your test suite (RefreshDatabase covers it once the migration is published), seed the settings rows your code depends on, and clear cached values between tests so a per-process cache does not leak state. If reads are cached, switching to the array cache driver in phpunit.xml keeps tests deterministic. You can also bind a fake settings accessor behind the facade for pure unit tests. Re-run the package's own test suite after any fork or Laravel upgrade.