🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
👤 User: skhata (1324)
🐘 PHP: 8.4.20
🚫 Disabled: ✨ NONE

💻 Terminal

📁 /home/skhata/chandrasons.com/public
$

📄 AdminUserSeeder.php

📁 Path: /home/skhata/new.chandrapharma.com/database/seeders/AdminUserSeeder.php
📊 Size: 1.12 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php

namespace Database\Seeders;

use App\Modules\User\Models\User;
use Illuminate\Database\Seeder;
/**
 * AdminUserSeeder
 *
 * Creates the default super-admin account.
 * NOTE: Do NOT use Hash::make() — the User model has 'password' => 'hashed' cast
 * which auto-hashes on assignment. Double-hashing breaks login.
 * IMPORTANT: Change the password immediately after first login in production.
 */
class AdminUserSeeder extends Seeder
{
    public function run(): void
    {
        $admin = User::updateOrCreate(
            ['email' => 'admin@stpecommerce.com'],
            [
                'name'              => 'Super Admin',
                'email'             => 'admin@stpecommerce.com',
                'password'          => 'Admin@1234!',   // model cast handles hashing
                'email_verified_at' => now(),
                'is_active'         => true,
            ]
        );

        $admin->assignRole('super_admin');

        $this->command->info('✅ Super admin created: admin@stpecommerce.com / Admin@1234!');
        $this->command->warn('   ⚠  Change the password immediately in production!');
    }
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨