<?php
namespace Mitul\Generator\File;

use Storage;

class FileHelper
{
	public function writeFile($file, $contents)
	{
		Storage::put($file, $contents);
	}

	public function getFileContents($file)
	{
		return Storage::get($file);
	}
}

<?php

namespace Mitul\Generator\File;

class FileHelper
{
	public function writeFile($file, $contents)
	{
		file_put_contents($file, $contents);
	}

	public function getFileContents($file)
	{
		return file_get_contents($file);
	}
}
--- 
+++ 
@@ -1,16 +1,17 @@
 <?php
+namespace Mitul\Generator\File;
 
-namespace Mitul\Generator\File;
+use Storage;
 
 class FileHelper
 {
 	public function writeFile($file, $contents)
 	{
-		file_put_contents($file, $contents);
+		Storage::put($file, $contents);
 	}
 
 	public function getFileContents($file)
 	{
-		return file_get_contents($file);
+		return Storage::get($file);
 	}
 }
Refactor to use Laravel Storage - supporting Flysystem