I get an email address from the database. I need to split and collect it to protect it. There is a way, but I don't understand how to apply it fully.
For example we have an email address me@example.com
We split it down:
> me
> example
> com
and collect.
Here is an example function
@php
$split = explode('@', $email);
$first = $split[0];
$second = explode('.', $split[1])[0];
$third = explode('.', $split[1])[1];
<a href="" data-first="first" data-second="second" data-third="third">{{ $email }}</a>
@endphp
How can I properly apply the fields $first
$second
$third
to collect the email?