'Admin', 'slug' => 'admin', 'description' => 'Full access to all features and settings', ]); $moderatorRole = Role::create([ 'name' => 'Moderator', 'slug' => 'moderator', 'description' => 'Can approve/reject products and delete comments', ]); $userRole = Role::create([ 'name' => 'User', 'slug' => 'user', 'description' => 'Can submit products, upvote, and comment', ]); // Create test users $admin = User::create([ 'name' => 'Admin User', 'email' => 'admin@example.com', 'password' => Hash::make('password'), 'bio' => 'Administrator of the platform', 'email_verified_at' => now(), ]); $admin->roles()->attach($adminRole); $moderator = User::create([ 'name' => 'Moderator User', 'email' => 'moderator@example.com', 'password' => Hash::make('password'), 'bio' => 'Content moderator', 'email_verified_at' => now(), ]); $moderator->roles()->attach($moderatorRole); $regularUser = User::create([ 'name' => 'Regular User', 'email' => 'user@example.com', 'password' => Hash::make('password'), 'bio' => 'Regular platform user', 'website' => 'https://example.com', 'twitter' => 'example', 'github' => 'example', 'linkedin' => 'example', 'email_verified_at' => now(), ]); $regularUser->roles()->attach($userRole); $this->command->info('Roles and test users created successfully!'); $this->command->info('Admin: admin@example.com / password'); $this->command->info('Moderator: moderator@example.com / password'); $this->command->info('User: user@example.com / password'); } }