public function init($file, array $data = null)
    {
        if ($data === null) {
            $data = $this->setJsonDefaults([]);
        }
        $this->app['filesystem']->write($file, Json::dump($data, Json::HUMAN));
    }
public function init($file, array $data = null)
    {
        if ($data === null) {
            $data = $this->setJsonDefaults([]);
        }
        $this->app['filesystem']->write($file, Json::dump($data, Json::HUMAN));
    }
public function init ( $ file , array $ data = null ) { if ( $ data === null ) { $ data = $ this -> setJsonDefaults ( [ ] ) ; } $ this -> app [ 'filesystem' ] -> write ( $ file , Json :: dump ( $ data , Json :: HUMAN ) ) ; }
Initialise a JSON file at given location with optional data input.

@param string $file
@param array  $data
Initialise a JSON file at given location with optional data input .