clrghouz/database/seeders/InitialSetup.php

59 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use App\Models\{Software,System};
2023-10-17 12:19:28 +00:00
class InitialSetup extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('protocols')->insert([
'name'=>'BINKP',
'port'=>24554,
'active'=>TRUE,
]);
DB::table('protocols')->insert([
'name'=>'EMSI',
'port'=>60179,
'active'=>TRUE,
]);
DB::table('software')->insert([
'name'=>'Custom',
'active'=>TRUE,
'type'=>Software::SOFTWARE_MAILER,
]);
$so = new System;
$so->forceFill([
'name'=>'My New System',
'sysop'=>'System Sysop',
'location'=>'Melbourne, AU',
'active'=>TRUE,
]);
$so->save();
DB::table('setups')->insert([
'system_id'=>$so->id,
]);
2021-04-01 10:59:15 +00:00
DB::table('users')->insert([
2023-10-17 12:19:28 +00:00
'name'=>'System Admin',
'email'=>'admin@clrghouz',
'email_verified_at'=>Carbon::now(),
'admin'=>TRUE,
'active'=>TRUE,
2021-04-01 10:59:15 +00:00
'password'=>'$2y$10$bJQDLfxnKrh6o5Sa02MZOukXcLTNQiByXSTJ7fTr.kHMpV2wxbG6.',
]);
}
}