jeroen-g / textconveyor
Send any text over a conveyor to format it.
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jeroen-g/textconveyor
Requires
- illuminate/container: ^5.6
- illuminate/pipeline: ~5
Requires (Dev)
- league/commonmark: ~0.17
- phpunit/phpunit: ~7.0
Suggests
- illuminate/support: This package provides a Laravel service provider.
- league/commonmark: This allows the use of the markdown formatter
This package is auto-updated.
Last update: 2025-09-25 10:28:43 UTC
README
The TextConveyor takes your text, whatever size, and runs it through a list of formatters that is defined by you.
Installation
Via Composer
$ composer require jeroen-g/textconveyor
In case you're using Laravel, a service provider and facade get registered automatically. With artisan vendor:publish
you can alter the formatters that get set in the config file.
Usage
$assembler = new JeroenG\TextConveyor\Assembler; $assembler->setFormatters([App\RemoveBadWords::class, App\LowercaseNames::class]); $assembler->addFormatter(App\CapitalizeNames::class); $assembler->removeFormatter(App\LowercaseNames::class); $formattedText = $assembler->sendContentThroughFormatters($content);
This is how it could be used in an Eloquent model:
public function getBodyAttribute($body) { return app(JeroenG\TextConveyor\Assembler::class)->sendContentThroughFormatters($body); }
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
License
license. Please see the license file for more information.