Reshapes a bidirectional text to use with imaging libraries (GD, etc.).
Via Composer
$ composer require thesoulless/reshapetext
Add
Thesoulless\Reshapetext\ReshapetextServiceProvider::class,
to providers
and
'Reshapetext' => Thesoulless\Reshapetext\Facades\Reshapetext::class,
to aliases
section of config/app.php
$text = "متن راست به چپ";
$text = \Reshapetext::reshape($text);
This Laravel package is based on Persian-Log2Vis