1. Go to this page and download the library: Download mokhosh/muddle 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/ */
mokhosh / muddle example snippets
use Mokhosh\Muddle\Facades\Muddle;
use Mokhosh\Muddle\Strategies\Text;
use Mokhosh\Muddle\Strategies\Link;
// default strategy with facade
Muddle::text('[email protected]');
Muddle::link('[email protected]');
// specific strategy with facade
Muddle::strategy(text: new Text\Encrypt)->text('[email protected]')
Muddle::strategy(link: new Link\Encrypt)->link('[email protected]');
use Mokhosh\Muddle\Muddle;
use Mokhosh\Muddle\Strategies\Text;
use Mokhosh\Muddle\Strategies\Link;
$muddle = new Muddle(
text: new Text\Random,
link: new Link\Random,
);
$muddle->link('[email protected]');
return [
/*
|--------------------------------------------------------------------------
| Default Strategy
|--------------------------------------------------------------------------
|
| Set default strategies for obfuscating text and email links
|
*/
'strategy' => [
'text' => \Mokhosh\Muddle\Strategies\Text\Random::class,
'link' => \Mokhosh\Muddle\Strategies\Link\Random::class,
],
];