PHP code example of jeroen-g / textconveyor
1. Go to this page and download the library: Download jeroen-g/textconveyor library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jeroen-g / textconveyor example snippets
$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);
public function getBodyAttribute($body)
{
return app(JeroenG\TextConveyor\Assembler::class)->sendContentThroughFormatters($body);
}