cms/database/seeders/SettingSeeder.php
Funky Waddle 37ed997989 feat(cms): initialize Laravel project structure and core CMS files
- Added standard Laravel directory structure and configuration.

- Included Svelte and Tailwind configuration for the admin interface.

- Added core PHPUnit and testing scripts.
2026-04-13 12:48:06 -05:00

56 lines
1.3 KiB
PHP

<?php
namespace Database\Seeders;
use App\Models\Setting;
use Illuminate\Database\Seeder;
/**
* Seeder to populate initial site settings.
*/
class SettingSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run(): void
{
// Site Title
Setting::updateOrCreate(
['key' => 'site_title'],
['value' => 'SiteWeaver CMS', 'group' => 'general']
);
// SEO Settings
Setting::updateOrCreate(
['key' => 'seo_description'],
['value' => 'A modern-day modular CMS built with Laravel and Svelte.', 'group' => 'seo']
);
Setting::updateOrCreate(
['key' => 'seo_keywords'],
['value' => ['cms', 'laravel', 'svelte', 'modular'], 'group' => 'seo']
);
// Supported Languages
// Default to English as the primary locale
Setting::updateOrCreate(
['key' => 'supported_languages'],
[
'value' => [
['name' => 'English', 'abbreviation' => 'en'],
],
'group' => 'localization'
]
);
// Default Locale
Setting::updateOrCreate(
['key' => 'default_locale'],
['value' => 'en', 'group' => 'localization']
);
}
}