src/Console/Commands/SeedCommand.php
protected function createAdmin(string $password): Admin
    {
        $admin = [
            'is_active' => true,
            'username' => 'Admin',
            'given_name' => 'Admin',
            'family_name' => 'User',
            'email' => 'admin@example.com',
        ];

        return tap(app('cortex.auth.admin')->firstOrNew($admin)->fill([
            'remember_token' => str_random(10),
            'email_verified_at' => now(),
            'password' => $password,
        ]), function ($instance) {
            $instance->save();
        });
    }
protected function createAdmin(string $password): Admin
    {
        $admin = [
            'is_active' => true,
            'username' => 'Admin',
            'given_name' => 'Admin',
            'family_name' => 'User',
            'email' => 'admin@example.com',
        ];

        return tap(app('cortex.auth.admin')->firstOrNew($admin)->fill([
            'remember_token' => str_random(10),
            'email_verified_at' => now(),
            'password' => $password,
        ]), function ($instance) {
            $instance->save();
        });
    }
protected function createAdmin ( string $ password ) : Admin { $ admin = [ 'is_active' => true , 'username' => 'Admin' , 'given_name' => 'Admin' , 'family_name' => 'User' , 'email' => 'admin@example.com' , ] ; return tap ( app ( 'cortex.auth.admin' ) -> firstOrNew ( $ admin ) -> fill ( [ 'remember_token' => str_random ( 10 ) , 'email_verified_at' => now ( ) , 'password' => $ password , ] ) , function ( $ instance ) { $ instance -> save ( ) ; } ) ; }
Create admin model.

@param string $password

@return \Cortex\Auth\Models\Admin
Create admin model .