29 lines
786 B
PHP
29 lines
786 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\CountryLocale;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class CountryLocaleSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$global_country_locale = CountryLocale::where('slug', 'global')->first();
|
|
|
|
if (is_null($global_country_locale)) {
|
|
$global_country_locale = new CountryLocale;
|
|
$global_country_locale->name = 'Global';
|
|
$global_country_locale->slug = 'global';
|
|
$global_country_locale->i18n = 'en';
|
|
$global_country_locale->lang = 'en';
|
|
$global_country_locale->country_iso = '*';
|
|
$global_country_locale->enabled = true;
|
|
$global_country_locale->save();
|
|
}
|
|
}
|
|
}
|