Minor changes to optimise new installs
This commit is contained in:
76
database/seeders/InitialSetup.php
Normal file
76
database/seeders/InitialSetup.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
use App\Models\{Domain,Software,System,Zone};
|
||||
|
||||
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'=>'Clearing Houz - Dev',
|
||||
'sysop'=>'System Sysop',
|
||||
'location'=>'Melbourne, AU',
|
||||
'active'=>TRUE,
|
||||
]);
|
||||
$so->save();
|
||||
|
||||
$do = new Domain;
|
||||
$do->forceFill([
|
||||
'name'=>'private',
|
||||
'active'=>TRUE,
|
||||
'public'=>TRUE,
|
||||
'notes'=>'PrivateNet: Internal Testing Network'
|
||||
]);
|
||||
$do->save();
|
||||
|
||||
$zo = new Zone;
|
||||
$zo->forceFill([
|
||||
'zone_id'=>'10',
|
||||
'default'=>FALSE,
|
||||
'active'=>TRUE,
|
||||
'system_id'=>$so->id,
|
||||
]);
|
||||
$do->zones()->save($zo);
|
||||
|
||||
DB::table('setups')->insert([
|
||||
'system_id'=>$so->id,
|
||||
]);
|
||||
|
||||
DB::table('users')->insert([
|
||||
'name'=>'System Admin',
|
||||
'email'=>'admin@clrghouz',
|
||||
'email_verified_at'=>Carbon::now(),
|
||||
'admin'=>TRUE,
|
||||
'active'=>TRUE,
|
||||
'password'=>'$2y$10$bJQDLfxnKrh6o5Sa02MZOukXcLTNQiByXSTJ7fTr.kHMpV2wxbG6.',
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user