Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mokhosh committed Nov 6, 2024
1 parent 46894f6 commit 968485b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ In Laravel Projects:
```blade
{{-- instead of handing your emails to spammers like this: --}}
<a href="mailto:{{ $user->email }}">{{ $user->name }}</a>
{{-- do this: --}}
<x-muddle-link :email="$user->email" :title="$user->name" />
{{-- and we will confuscate the email in random ways to make it impossible for bots to steal your emails --}}
{{-- default strategy components --}}
{{-- default strategy components based on config --}}
<x-muddle-link email="[email protected]" title="email" /> {{-- muddled email link --}}
<x-muddle-text email="[email protected]" /> {{-- muddled email text --}}
{{-- specific link strategy components --}}
<x-muddle-random email="[email protected]" title="email" />
<x-muddle-random email="[email protected]" title="email" /> {{-- picks a random strategy each time --}}
<x-muddle-append email="[email protected]" title="email" />
<x-muddle-concatenation email="[email protected]" title="email" />
<x-muddle-encrypt email="[email protected]" title="email" />
Expand All @@ -44,7 +46,7 @@ In Laravel Projects:
<x-muddle-rotate email="[email protected]" title="email" />
{{-- specific text strategy components --}}
<x-muddle-text-random email="[email protected]" />
<x-muddle-text-random email="[email protected]" /> {{-- picks a random strategy each time --}}
<x-muddle-text-append email="[email protected]" />
<x-muddle-text-concatenation email="[email protected]" />
<x-muddle-text-display-none email="[email protected]" />
Expand All @@ -59,16 +61,16 @@ use Mokhosh\Muddle\Facades\Muddle;
use Mokhosh\Muddle\Strategies\Text;
use Mokhosh\Muddle\Strategies\Link;

// default strategy with facade
// default strategy
Muddle::text('[email protected]');
Muddle::link('[email protected]');

// specific strategy with facade
// specific strategy
Muddle::strategy(text: new Text\Encrypt)->text('[email protected]')
Muddle::strategy(link: new Link\Encrypt)->link('[email protected]');
```

In PHP Projects:
In plain PHP Projects:

```php
use Mokhosh\Muddle\Muddle;
Expand Down

0 comments on commit 968485b

Please sign in to comment.