src/Console/Commands/GenerateModels.php
protected function write($file, $file_path)
    {
        if (! is_dir(dirname($file_path))) {
            mkdir(dirname($file_path), 0755, true);
        }
        file_put_contents(
            $file_path,
            file_get_contents(
                dirname(__FILE__)
                .DIRECTORY_SEPARATOR
                .'..'.DIRECTORY_SEPARATOR
                .'..'.DIRECTORY_SEPARATOR
                .'..'.DIRECTORY_SEPARATOR
                .'templates'
                .DIRECTORY_SEPARATOR
                .$file
                .'.txt'
            )
        );
    }
protected function write($file, $file_path)
    {
        if (! is_dir(dirname($file_path))) {
            mkdir(dirname($file_path), 0755, true);
        }
        file_put_contents(
            $file_path,
            file_get_contents(
                dirname(__FILE__)
                .DIRECTORY_SEPARATOR
                .'..'.DIRECTORY_SEPARATOR
                .'..'.DIRECTORY_SEPARATOR
                .'..'.DIRECTORY_SEPARATOR
                .'templates'
                .DIRECTORY_SEPARATOR
                .$file
                .'.txt'
            )
        );
    }
write the file to the file path

@param string
@param string

@return void