Download the PHP package bambamboole/filament-settings without Composer

On this page you can find all versions of the php package bambamboole/filament-settings. 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 filament-settings

Filament Settings

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A database-driven settings plugin for Filament. Settings are organised into groups, edited through a tabbed Filament page, and read anywhere via the settings() helper or the typed SettingsRepository methods.

Installation

Publish and run the migration:

Setup

Register the plugin in your panel provider and pass your SettingGroup classes:

Generating a Setting Group

Use the Artisan command to scaffold a new SettingGroup class interactively:

The command asks for a class name, group key, and label, then writes the skeleton to app/Settings/{ClassName}.php:

The group key is derived automatically from the class name (GeneralSettingsgeneral, MailNotificationSettingsmail-notification). Accept the defaults or type a custom value.

After generation, open the file and fill in schema() with Filament form components and optionally add casts(), icon(), and sort().

Defining a Setting Group

Create a class that extends SettingGroup. The key() is used as the DB prefix and the tab identifier; schema() returns standard Filament form components:

Field name convention

Form field names use snake_case (e.g. site_name). They are stored in the database as kebab-case keys prefixed with the group key (e.g. general.site-name).

Casts

Declare non-string fields in casts(). Supported types: boolean, integer. Everything else is returned as a raw string.

Access control per group

Override canAccess() on a group to hide it from certain users:

Reading Settings

Helper function

Typed repository methods

Injecting the repository

Caching

Caching is enabled by default. All settings for each tenant are loaded and cached in a single cache entry per tenant. Casts from all registered groups are cached together in one additional entry.

Cache key Contains
settings.global All settings where team_id IS NULL
settings.{id} All settings for tenant with that ID
settings.casts Combined cast map from all SettingGroups

The tenant bucket is automatically invalidated whenever a setting is saved or deleted. Configure the TTL or disable caching in config/filament-settings.php:

Multi-Tenancy

All settings have a team_id column. A global scope filters every query to the current tenant automatically. When team_id is null, the global (non-tenant) settings are used.

Configure the active tenant via the plugin:

When using Filament's built-in tenancy, Filament::getTenant() is used automatically — no manual configuration needed.

Plugin Options

Method Description
groups(array) SettingGroup classes to register
canAccess(Closure) Guard access to the entire settings page
tenant(Closure) Custom resolver for the current tenant ID
navigationSort(int) Position in the sidebar (default: 99)
navigationGroup(?string) Sidebar group label (default: none)

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-settings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^5.0
spatie/laravel-package-tools Version ^1.15.0
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 bambamboole/filament-settings contains the following files

Loading the files please wait ...