LaravelPackages.net
Acme Inc.
Toggle sidebar
cheanizer/laravel-doc-template

Library for templating like mail merge for PHP with RTF file.

29
5
About cheanizer/laravel-doc-template

cheanizer/laravel-doc-template is a Laravel package for library for templating like mail merge for php with rtf file.. It currently has 5 GitHub stars and 29 downloads on Packagist. Install it with composer require cheanizer/laravel-doc-template. Discover more Laravel packages by cheanizer or browse all Laravel packages to compare alternatives.

Last updated

Description

DocTemplate is a Laravel library for generate doc file using .rtf file easily. Simply add .rtf file from msword and use it for template like we use blade template.

The main feature is replacing string using .rtf file.

Installation

use Composer to install DocTemplate

composer require cheanizer/laravel-doc-template

dont forget to register package to L4 users.

 'providers' => [
        ...
        Cheanizer\DocTemplate\DocTemplateServiceProvider::class,
        ...
]

Usage


DocTemplate::template(storage_path('app/public/template.rtf'))
            ->with(['total' => '80.000.000'])
            ->save(storage_path('testing-' . time() . '.doc'));

Todo

  • Add direct download with header.
  • Add iteration functionality inside the template.

Credit

This package is inpired by another same functionality library laravel-word-template

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Star History Chart