Download the PHP package sitesource/laravel-polymorphic-settings-filament without Composer

On this page you can find all versions of the php package sitesource/laravel-polymorphic-settings-filament. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-polymorphic-settings-filament

Filament integration for laravel-polymorphic-settings

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A base Filament page class and helper trait that auto-bind your form schema to sitesource/laravel-polymorphic-settings. Stop hand-rolling mount() / save() plumbing on every settings page.

That's it. Mount pulls every field's current value from the settings store. Save persists every field back, encrypting any TextInput->password() field at rest. No mount() or save() to write yourself.

Installation

You'll also need the core package installed and migrated:

Filament 4.x or 5.x is required. (Filament 3.x is supported by the v0.1.x line of this package.)

Usage

Global settings page

The default scope is global — settings live alongside PolymorphicSettings::global() reads/writes:

Scoped to a model (per-team, per-tenant, per-user)

Override scopeFor() to return the model whose settings you're editing:

Encryption

Any TextInput marked with ->password() is automatically persisted as encrypted: true. The Filament form continues to work normally — the user types a plaintext value, the page encrypts on save, and the next mount decrypts transparently.

Customising the post-save UX

Default behaviour is a Filament success notification. Override onSaved() to do anything else.

Trait variant: BindsToSettings

If you want to keep your own Page base (or use this on any Livewire component, not just Filament pages), use the trait:

The trait gives you fillFromSettings(array $keys): array and persistToSettings(array $values, array $encryptedKeys = []): void. You own the form schema and the lifecycle — the trait just bulk-reads and bulk-writes the store.

Testing

13 tests, 23 assertions. PHPStan level 5 + Pint clean.

Changelog

See CHANGELOG.md.

Credits

License

MIT — see LICENSE.md.


All versions of laravel-polymorphic-settings-filament with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2||^8.3||^8.4||^8.5
filament/filament Version ^3.0||^4.0||^5.0
illuminate/contracts Version ^12.0||^13.0
sitesource/laravel-polymorphic-settings Version ^0.1.2
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sitesource/laravel-polymorphic-settings-filament contains the following files

Loading the files please wait ...