Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anders 2020-08-05 09:43:59 +02:00
commit d43ccb2a78
2 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,71 @@
<?php
use Illuminate\Database\Seeder;
class ContactSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$contactdata = [
[
'contactname' => "Claus Trasbo",
'email' => "ctr@sde.dk",
'title' => "Forstander for Erhvervskollegiet",
'phone' => "40886515",
'phonetimes' => "",
],
[
'contactname' => "Birgitte True",
'email' => "bit@sde.dk",
'title' => "",
'phone' => "40886515",
'phonetimes' => "<p><strong>Mandag-Torsdag:</strong> 8.00-15.00<br><strong>Fredag:</strong> 8.00-12.00</p>",
],
[
'contactname' => "Thomas Thomsen",
'email' => "thth@sde.dk",
'title' => "Kollegieassistent",
'phone' => "24629450",
'phonetimes' => "",
],
[
'contactname' => "Anja Holm Brix",
'email' => "ahb@sde.dk",
'title' => "Kollegieassistent",
'phone' => "24629450",
'phonetimes' => "",
],
[
'contactname' => "Britta Overgaard Brink Olsen",
'email' => "brio@sde.dk",
'title' => "Kollegieassistent",
'phone' => "24629450",
'phonetimes' => "",
],
[
'contactname' => "Jesper Sandberg",
'email' => "jesa@sde.dk",
'title' => "Kollegieassistent",
'phone' => "24629450",
'phonetimes' => "",
],
];
foreach ($contactdata as $data) {
$contact = new \App\Contact();
$contact->contactname = $data["contactname"];
$contact->email = $data["email"];
$contact->title = $data["title"];
$contact->phone = $data["phone"];
$contact->phonetimes = $data["phonetimes"];
$contact->save();
}
}
}

View File

@ -14,5 +14,6 @@ class DatabaseSeeder extends Seeder
$this->call(PermissionSeeder::class); $this->call(PermissionSeeder::class);
$this->call(RoleSeeder::class); $this->call(RoleSeeder::class);
$this->call(UserSeeder::class); $this->call(UserSeeder::class);
$this->call(ContactSeeder::class);
} }
} }