sync
This commit is contained in:
28
database/seeders/CountryLocaleSeeder.php
Normal file
28
database/seeders/CountryLocaleSeeder.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user