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

Laravel Settings Laravel Package

letsgoi/laravel-settings

A Laravel package for managing application settings with database persistence and a simple API for reading, writing, and caching configurable values at runtime. Ideal for editable app configuration without code changes.

View on GitHub
Deep Wiki
Context7

Getting Started

This assessment is based on the 4.0.1 release (no prior baseline existed), so treat package-specific names below as placeholders and confirm them against the repo's README and composer.json.

  1. Install and inspect before wiring anything up.

    composer require <vendor>/<package>:^4.0
    php artisan vendor:publish --provider="<Vendor>\<Package>\<Package>ServiceProvider"
    

    Look first at three things: the published config file (defaults, driver/table names), the published migrations (this package ships schema, which is unusual enough to matter), and the service provider's bindings (what you resolve from the container vs. what is a facade).

  2. Run migrations before you write code against it. The 4.0.1 fix adds a migration converting a value column from string (VARCHAR(255)) to text. Confirm it lands:

    php artisan migrate
    php artisan tinker
    >>> Schema::getColumnType('<table>', 'value'); // expect "text"
    
  3. First use case. Persist something longer than 255 characters through the package's public API (model, repository, or facade — whichever the README documents) and read it back. If that round-trip works, the upgrade is functionally complete. If it throws a "data too long" or truncation error, the migration did not apply to the connection/table you think it did.

Implementation Patterns

  • Treat package migrations as part of your deploy pipeline, not as a one-off. Any environment that runs the package's code must have run its migrations first. Add them to the standard php artisan migrate --force step rather than publishing-then-forgetting.
  • Order deploys migrate-first. The safe sequence for 4.0.1 is: run migrations, then release application code. Old code writing VARCHAR-length values into a TEXT column is harmless; new code writing 300+ characters into a not-yet-migrated VARCHAR column is a runtime failure under load.
  • Wrap multi-write operations in transactions. Packages that persist a value blob typically also touch an index or cache row alongside it. If the package exposes a repository/service, prefer it over touching the table directly — it usually owns cache invalidation.
  • Test against the real schema. In RefreshDatabase test suites the package migrations run automatically, so you get TEXT for free — which means tests will not catch a production environment stuck on the old column type. Add one assertion or a CI check on column type if this column previously caused truncation bugs.
  • Cache config after publishing. php artisan config:cache in deploy is standard, but it means config changes require a re-cache; don't debug a "config ignored" issue before checking for a stale bootstrap cache.
  • Queue workers need a restart after upgrading, since the package's service provider and config are loaded at boot.

Gotchas and Tips

  • The 4.0.1 migration is a schema change on live data — plan for locking. On MySQL, VARCHAR → TEXT is generally a table rebuild (copy algorithm) unless you are on 8.0+ with ALGORITHM=INPLACE support for the specific change. On a large table this blocks writes for the duration. Test the migration against a production-sized copy, or use pt-online-schema-change/gh-ost and mark the migration as already-run.
  • Postgres is cheap here. ALTER TABLE ... ALTER COLUMN value TYPE text from varchar is metadata-only. SQLite rebuilds the table under the hood and has its own constraints — verify on the driver you actually deploy, not the one in your local .env.
  • Check indexes on value. A TEXT column cannot be fully indexed on MySQL without a prefix length. If the old VARCHAR column had an index, inspect whether the migration preserved, altered, or silently affected it — an index change can cause a query plan regression that has nothing to do with the column type.
  • Do not roll back casually. The down() migration almost certainly converts TEXT back to VARCHAR(255), which truncates or fails on any row now holding longer content. Take a backup before rolling back, or write a no-op down() in a locally amended copy.
  • Widening is backward compatible at the read layer — old application code reading TEXT gets a string as before. The risk is entirely on the write path and the migration window, not on deserialization.
  • Debugging truncation: if you still see String data, right truncated after upgrading, confirm which connection the package uses (config('database.default') vs. an explicit connection in its config) — publishing a config with a hardcoded connection name is a common cause of "migrated but still broken."
  • Extension point: if the package's model is configurable in config/<package>.php, subclass it rather than editing published migrations, so future 4.x patch migrations apply cleanly.
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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin