protected function write(array $capsules)
    {
        $converted = array_map(function ($capsule) {
            return $capsule->toArray();
        }, $capsules);

        File::put($this->capsuleFile, Helpers::prettifyJson($converted));
    }