public function getValue(string $mailableClass, string $argumentName, string $argumentType = '', $defaultValue = null)
    {
        if ($argumentType === 'int') {
            return $defaultValue ?? $this->faker->numberBetween(1, 100);
        }

        if ($argumentType === 'string') {
            return $defaultValue ?? $this->faker->sentence();
        }

        if ($argumentType === 'bool') {
            $defaultValue = ($defaultValue == 'false' ? false : $defaultValue);

            return $defaultValue ?? $this->faker->boolean(50);
        }

        try {
            $argumentValue = app($argumentType);
        } catch (Exception $exception) {
            throw CouldNotDetermineValue::create($argumentType, $argumentName, $exception);
        }

        if ($argumentValue instanceof Model) {
            return $this->getModelInstance($mailableClass, $argumentName, $argumentValue, $id = $defaultValue);
        }

        return $argumentValue;
    }
public function getValue(string $mailableClass, string $argumentName, string $argumentType = '', $defaultValue = null)
    {
        if ($argumentType === 'int') {
            return $defaultValue ?? $this->faker->numberBetween(1, 100);
        }

        if ($argumentType === 'string') {
            return $defaultValue ?? $this->faker->sentence();
        }

        if ($argumentType === 'bool') {
            $defaultValue = ($defaultValue == 'false' ? false : $defaultValue);

            return $defaultValue ?? $this->faker->boolean(50);
        }

        try {
            $argumentValue = app($argumentType);
        } catch (Exception $exception) {
            throw CouldNotDetermineValue::create($argumentType, $argumentName, $exception);
        }

        if ($argumentValue instanceof Model) {
            return $this->getModelInstance($mailableClass, $argumentName, $argumentValue, $id = $defaultValue);
        }

        return $argumentValue;
    }
@param string $mailableClass
@param string $argumentName
@param string $argumentType
@param string|null $defaultValue

@return mixed