Beartropy Settings
Unlike traditional packages that use a config file, Beartropy Settings is fully database-driven. This means both the values and the definitions (labels, types, options) of your settings are stored in the database.
This allows you to add, edit, or remove settings dynamically at runtime without deploying code changes.
Defining Settings
You can define settings in two ways:
- Via the UI: Use the provided Livewire component to create new settings visually.
- Via Seeding: For initial setup, you can seed the
beartropy_settingstable.
1\Beartropy\Settings\Models\Setting::create([2 'group' => 'general',3 'key' => 'site.name',4 'label' => 'Application Name',5 'value' => 'My App',6 'type' => 'text',7 'is_system' => true, // Prevents deletion from UI8]);