database/seeds/UserSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $root = User::create([
            'nama' => 'Root',
            'email' => 'ypiacademy.putra@gmail.com',
            'username' => 'root',
            'password' => Hash::make('mashdar-mimi'),
            'gender' => 1
        ]);
        $root->roles()->attach(1);
        $admin = User::create([
            'nama' => 'Admin',
            'email' => 'mahadumar.ypia@gmail.com',
            'username' => 'admin',
            'password' => Hash::make('ma3qulelma3na'),
            'gender' => 1
        ]);
        $admin->roles()->attach(1);
    }
public function run ( ) { $ root = User :: create ( [ 'nama' => 'Root' , 'email' => 'ypiacademy.putra@gmail.com' , 'username' => 'root' , 'password' => Hash :: make ( 'mashdar-mimi' ) , 'gender' => 1 ] ) ; $ root -> roles ( ) -> attach ( 1 ) ; $ admin = User :: create ( [ 'nama' => 'Admin' , 'email' => 'mahadumar.ypia@gmail.com' , 'username' => 'admin' , 'password' => Hash :: make ( 'ma3qulelma3na' ) , 'gender' => 1 ] ) ; $ admin -> roles ( ) -> attach ( 1 ) ; }
Run the database seeds.
Run the database seeds .