Download the PHP package metalinked/laravel-settings-kit without Composer

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

Laravel Settings Kit

Tests GitHub Release Total Downloads License

A Laravel package for managing global and user-specific settings with multilingual support, built-in caching, and a full REST API.

Features

Requirements

PHP 8.1 or higher, Laravel 9 or higher.

Installation

Publish the config file (optional):

Basic Usage

Auto-creation and type detection

setWithAutoCreate() creates the preference automatically if it does not exist, detecting the type from the PHP value:

Predefined settings (recommended)

For production use, create settings upfront via a seeder so you have full control over type, defaults, and constraints:

Values for select settings are validated on write: passing a value not in options throws an InvalidArgumentException.

Global vs. User Settings

The package distinguishes two types of settings based on the is_user_customizable column.

Global unique settings (is_user_customizable = false) apply to the entire application. Calling Settings::set('maintenance_mode', true) updates default_value directly and affects everyone immediately.

User-customisable settings (is_user_customizable = true) have a global default that individual users can override. The global default lives in preferences.default_value. Per-user overrides are stored in user_preferences only when the user actually changes the value, keeping the table lean.

Loading all settings for a user

allForUser() is designed for app boot: one query fetches all customisable settings with resolved values and an is_overridden flag showing whether the user has personalised each one.

To retrieve only the settings a user has explicitly overridden:

Multilingual Labels

Events

A SettingUpdated event is dispatched after every set() and forget() call:

Blade Directive

Artisan Commands

REST API

Enable the API in your .env:

For local development, you can bypass authentication entirely:

Endpoints

Query parameters: locale (for translated labels), role, category, user_id.

Authentication

Mode Config Use case
Static token SETTINGS_KIT_API_AUTH=token, SETTINGS_KIT_API_TOKEN=your-token Server-to-server integrations (full access)
Laravel Sanctum SETTINGS_KIT_API_AUTH=sanctum User-facing SPAs
Laravel Passport SETTINGS_KIT_API_AUTH=passport OAuth applications
Dev bypass SETTINGS_KIT_API_DISABLE_AUTH_DEV=true Local development only

Note: Token mode grants full access to all users' settings. Use Sanctum or Passport for user-facing APIs where each user should only access their own settings.

Batch update example

Response format

All responses include a success boolean:

Error responses:

Configuration

Full config reference after publishing (config/settings-kit.php):

Facade Reference

Method Description
get(key, userId?) Get a setting value
getMultiple(keys[], userId?) Get multiple settings in one query
remember(key, default, userId?) Get a value, auto-creating it with the default if missing
set(key, value, userId?, autoCreate?) Set a value
setMultiple(keyValues[], userId?) Set multiple values in one call
setWithAutoCreate(key, value, userId?) Set a value, creating the preference if needed
isEnabled(key, userId?) Boolean check
forget(key, userId) Remove a user's override, reverting to the global default
forgetAll(userId) Remove all overrides for a user, returns count
delete(key) Permanently delete a preference and all its data
count(category?, role?) Count preferences
has(key) / exists(key) Check existence
all(role?, userId?, category?) All settings as array
allWithTranslations(locale?, role?, userId?, category?) All settings with translated labels
allForUser(userId, locale?, category?) All customisable settings for a user, with is_overridden flag
getUserOverrides(userId) Only the settings a user has explicitly overridden
getByCategory(category, userId?, role?) Settings for a category
getCategories() Available category names
label(key, locale?) Translated label
description(key, locale?) Translated description
create(data[]) Create a preference
createIfNotExists(key, data[]) Create only if absent
createWithTranslations(key, data[], translations[]) Create with i18n content
addTranslations(key, translations[]) Add or update translations
clearAllCache() Clear all cached values (works with any driver)

Testing

Contributing

Please see CONTRIBUTING.md for details.

License

MIT © Metalinked


All versions of laravel-settings-kit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.0|^12.0|^13.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 metalinked/laravel-settings-kit contains the following files

Loading the files please wait ...