private static function getHashids(){
		if (is_null(static::$hashIds)){

			$minSlugLength = config('hashslug.minSlugLength', 5);
			if(isset(static::$minSlugLength)) {
				$minSlugLength = static::$minSlugLength;
			}

			if(isset(static::$modelSalt)) {
				$modelSalt = static::$modelSalt;
			}else{
				$modelSalt = get_called_class();
			}

			if(isset(static::$alphabet)) {
				$alphabet = static::$alphabet;
			}else{
				$alphabet = config('hashslug.alphabet', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');
			}

			$salt = config('hashslug.appsalt', config('app.key')) . $modelSalt;
			
			// This is impotant!
			// Don't use a weak hash, otherwise
			// your app key can be exposed
			// http://carnage.github.io/2015/08/cryptanalysis-of-hashids
			$salt = hash('sha256', $salt);

			static::$hashIds = new \Hashids\Hashids($salt, $minSlugLength, $alphabet);
		}

		return static::$hashIds;
	}
private static function getHashids(){
		if (is_null(static::$hashIds)){

			$minSlugLength = config('hashslug.minSlugLength', 5);
			if(isset(static::$minSlugLength)) {
				$minSlugLength = static::$minSlugLength;
			}

			if(isset(static::$modelSalt)) {
				$modelSalt = static::$modelSalt;
			}else{
				$modelSalt = get_called_class();
			}

			if(isset(static::$alphabet)) {
				$alphabet = static::$alphabet;
			}else{
				$alphabet = config('hashslug.alphabet', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');
			}

			$salt = config('hashslug.appsalt', config('app.key')) . $modelSalt;
			
			// This is impotant!
			// Don't use a weak hash, otherwise
			// your app key can be exposed
			// http://carnage.github.io/2015/08/cryptanalysis-of-hashids
			$salt = hash('sha256', $salt);

			static::$hashIds = new \Hashids\Hashids($salt, $minSlugLength, $alphabet);
		}

		return static::$hashIds;
	}
private static function getHashids ( ) { if ( is_null ( static :: $ hashIds ) ) { $ minSlugLength = config ( 'hashslug.minSlugLength' , 5 ) ; if ( isset ( static :: $ minSlugLength ) ) { $ minSlugLength = static :: $ minSlugLength ; } if ( isset ( static :: $ modelSalt ) ) { $ modelSalt = static :: $ modelSalt ; } else { $ modelSalt = get_called_class ( ) ; } if ( isset ( static :: $ alphabet ) ) { $ alphabet = static :: $ alphabet ; } else { $ alphabet = config ( 'hashslug.alphabet' , 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' ) ; } $ salt = config ( 'hashslug.appsalt' , config ( 'app.key' ) ) . $ modelSalt ; // This is impotant! // Don't use a weak hash, otherwise // your app key can be exposed // http://carnage.github.io/2015/08/cryptanalysis-of-hashids $ salt = hash ( 'sha256' , $ salt ) ; static :: $ hashIds = new \ Hashids \ Hashids ( $ salt , $ minSlugLength , $ alphabet ) ; } return static :: $ hashIds ; }
Returns a chached Hashids instanse
or initialises it with salt

@return \Hashids\Hashids
Returns a chached Hashids instanse or initialises it with salt