presseportale/database/seeders/DatabaseSeeder.php
Kevin Adametz 0a3e52d603 19-05-2026 Rebrand Pressekonto, Hub-Flux UI und Legacy-Media-Migration
Umbenennung presseportale → pressekonto in Domains, Themes und Dokumentation.
Design-Tokens, Portal-Shell, Customer-Dashboard, Auth- und Admin-PM-Views.
Artisan-Befehl migrate:legacy-media mit Tests und Hub-Flux-Entwicklungsdocs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 16:36:13 +00:00

52 lines
1.5 KiB
PHP

<?php
namespace Database\Seeders;
use App\Enums\Portal;
use App\Enums\RegistrationType;
use App\Models\User;
use App\Services\Auth\UserRolePermissionSyncService;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(UserRolePermissionSyncService $rolePermissionSync): void
{
$this->call([
RolesAndPermissionsSeeder::class,
AdminPresetSeeder::class,
PaymentOptionSeeder::class,
// CategorySeeder::class,
]);
$adminUser = User::firstOrCreate([
'email' => 'admin@pressekonto.test',
], [
'name' => 'Portal Admin',
'password' => Hash::make('password'),
'portal' => Portal::Both->value,
'registration_type' => RegistrationType::ExistingLegacy->value,
'language' => 'de',
'is_active' => true,
]);
$rolePermissionSync->assignRoleAndSyncPermissions($adminUser, 'admin');
$testUser = User::firstOrCreate([
'email' => 'test@example.com',
], [
'name' => 'Test User',
'password' => Hash::make('password'),
'portal' => Portal::Both->value,
'registration_type' => RegistrationType::ExistingLegacy->value,
'language' => 'de',
'is_active' => true,
]);
$rolePermissionSync->assignRoleAndSyncPermissions($testUser, 'customer');
}
}