Basic tenant structure
This commit is contained in:
43
app/Installer/DevelopmentDataSeeder.php
Normal file
43
app/Installer/DevelopmentDataSeeder.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Installer;
|
||||
|
||||
use App\Enumerations\UserRole;
|
||||
use App\Models\Tenant;
|
||||
use App\Models\User;
|
||||
|
||||
class DevelopmentDataSeeder {
|
||||
public function execute() {
|
||||
$this->installTenants();
|
||||
$this->installUsers();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function installTenants() {
|
||||
Tenant::create([
|
||||
'slug' => 'wilde-moehre',
|
||||
'local_group_name' => 'Stamm Wilde Möhre',
|
||||
'url' => 'wilde-moehre.mareike.local',
|
||||
'account_iban' => 'DE12345678901234567890',
|
||||
'email' => 'test@example1.com',
|
||||
'city' => 'Halle (Saale)',
|
||||
'postcode' => '06120',
|
||||
'is_active_local_group' => true,
|
||||
'has_active_instance' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
private function installUsers() {
|
||||
User::create([
|
||||
'firstname' => 'Development',
|
||||
'lastname' => 'User',
|
||||
'user_role' => UserRole::USER_ROLE_ADMIN,
|
||||
'tenant' => 'lv',
|
||||
'email' => 'th.guenther@saale-mail.de',
|
||||
'password' => bcrypt('development'),
|
||||
'local_group_id' => 1,
|
||||
'username' => 'development',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user