<?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);
	}
}
<?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);
	}
}

Refactor to use Laravel Storage - supporting Flysystem
Refactor to use Laravel Storage - supporting Flysystem