Download the PHP package sgflores/schema-settings without Composer

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

Laravel Schema Settings

License: MIT PHP Version Laravel Version

A powerful Laravel package for managing dynamic, schema-driven application settings with validation, caching, encryption, and audit trails.

What is Schema Settings?

Schema Settings provides a type-safe, validated approach to managing application configuration. Define your settings schema once, then get automatic validation, type casting, caching, and audit trails for all setting changes.

Key Features

Installation

Install via Composer:

Quick Setup

1. Publish Configuration & Migrations

2. Publish Example Schema Classes

This creates example schema classes:

3. Define Your Settings Schema

Edit app/Providers/SchemaSettings/GlobalSettings.php:

4. Register Your Schema

Option 1: Using the Generated Service Provider (Recommended)

The package generates a SchemaSettingServiceProvider for you under app/Providers/SchemaSettings. Register it in bootstrap/providers.php:

The generated service provider will automatically register your schema classes:

Option 2: Manual Registration

Alternatively, register schemas directly in your AppServiceProvider:

Basic Usage

Using the Facade

Using Helper Functions

Model-Scoped Settings

Define a model-scoped schema:

Add the trait to your model:

Use settings on model instances:

Available Data Types

Type PHP Type Example
TYPE_STRING string 'Hello World'
TYPE_LONG_TEXT string 'Long description text...' (Frontend: textarea)
TYPE_INTEGER int 42
TYPE_BOOLEAN bool true
TYPE_FLOAT float 3.14
TYPE_ARRAY array ['a', 'b']
TYPE_JSON array ['key' => 'value']
TYPE_DATE DateTime new DateTime() (formatted as Y-m-d)
TYPE_TIME DateTime new DateTime() (formatted as H:i:s)
TYPE_DATETIME DateTime new DateTime() (formatted as Y-m-d H:i:s)
TYPE_ENUM Enum Status::Active

Dynamic Options with lazyOptions()

For settings with database-dependent options, use lazyOptions() to lazy-load options only when needed:

Benefits:

Enhanced Type Validation

The package includes enhanced validation that catches type mismatches during the fluent chain definition. This provides immediate feedback and prevents runtime errors.

API Routes

The package provides API routes for retrieving settings schema with values, perfect for frontend form generation.

Configuration

Configure API routes in config/schema-settings.php:

Endpoints

Get Settings Schema with Values

Response Example:

Disabling Routes

Set SCHEMA_SETTINGS_ROUTES_ENABLED=false in your .env file to disable API routes entirely.

Artisan Commands

Configuration

The config/schema-settings.php file allows you to customize:

Testing

The package includes a comprehensive test suite:

Alternative Packages

If this package doesn't meet your needs, here are some alternative Laravel settings packages:

Spatie Laravel Settings

Rawilk Laravel Settings

Why Choose Schema Settings?

It offers a unique schema-driven approach that provides:

Documentation

For detailed information about advanced features and implementation details:

License

This package is open-sourced software licensed under the MIT license.

Author

sgflores


Made with ❤️ for the Laravel community


All versions of schema-settings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/validation Version ^10.0|^11.0|^12.0
illuminate/cache Version ^10.0|^11.0|^12.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 sgflores/schema-settings contains the following files

Loading the files please wait ...