generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" /> | ||
|
@@ -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]" /> | ||
|
@@ -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; | ||
|