src/Console/Commands/SeedCommand.php
protected function createGuardian(string $password): Guardian
    {
        $guardian = [
            'is_active' => true,
            'username' => 'Guardian',
            'email' => 'guardian@example.com',
        ];

        return tap(app('cortex.auth.guardian')->firstOrNew($guardian)->fill([
            'remember_token' => str_random(10),
            'password' => $password,
        ]), function ($instance) {
            $instance->save();
        });
    }
protected function createGuardian(string $password): Guardian
    {
        $guardian = [
            'is_active' => true,
            'username' => 'Guardian',
            'email' => 'guardian@example.com',
        ];

        return tap(app('cortex.auth.guardian')->firstOrNew($guardian)->fill([
            'remember_token' => str_random(10),
            'password' => $password,
        ]), function ($instance) {
            $instance->save();
        });
    }
protected function createGuardian ( string $ password ) : Guardian { $ guardian = [ 'is_active' => true , 'username' => 'Guardian' , 'email' => 'guardian@example.com' , ] ; return tap ( app ( 'cortex.auth.guardian' ) -> firstOrNew ( $ guardian ) -> fill ( [ 'remember_token' => str_random ( 10 ) , 'password' => $ password , ] ) , function ( $ instance ) { $ instance -> save ( ) ; } ) ; }
Create guardian model.

@param string $password

@return \Cortex\Auth\Models\Guardian
Create guardian model .