Application Settings

A key-value settings table for storing application configuration that can be modified at runtime without code changes.

ERD Concept

Simple key-value store: Settings table with group, key, value, and type columns. Supports different data types for flexible configuration.

Tables

settings

id group key value (text/json) type timestamps

Migration

Migration
Schema::create('settings', function (Blueprint $table) {
    $table->id();
    $table->string('group')->default('general');
    $table->string('key');
    $table->longText('value')->nullable();
    $table->string('type')->default('string'); // string, integer, boolean, json
    $table->timestamps();
    $table->unique(['group', 'key']);
    $table->index('group');
});