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

        File::put($this->capsuleFile, Helpers::prettifyJson($converted));
    }
protected function write(array $capsules)
    {
        $converted = array_map(function ($capsule) {
            return $capsule->toArray();
        }, $capsules);

        File::put($this->capsuleFile, Helpers::prettifyJson($converted));
    }
protected function write ( array $ capsules ) { $ converted = array_map ( function ( $ capsule ) { return $ capsule -> toArray ( ) ; } , $ capsules ) ; File :: put ( $ this -> capsuleFile , Helpers :: prettifyJson ( $ converted ) ) ; }
Writes array of capsules to the file.

@param array $capsules

@return void
Writes array of capsules to the file .