An Interest In:
Web News this Week
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
- April 12, 2024
- April 11, 2024
- April 10, 2024
November 18, 2021 09:14 am GMT
Original Link: https://dev.to/marcosgad/new-tips-in-laravel-1a9d
New Tips In Laravel
mask() - before() - after()
use Illuminate\Support\Str;$str = '[email protected]';Str::mask($str, '*', 4); // marc****************Str::mask($str, '*', 4, 3); // marc***[email protected]Str::mask($str, '*', -4); // marcosgaad@gmail****Str::mask($str, '*', -4, 3); // marcosgaad@gmail***m$before = Str::before($str, '@'); // marcosgaadStr::mask($before, '*', 0) . '@' . Str::after($str, '@'); // **********@gmail.com
I hope you enjoy the code.
Original Link: https://dev.to/marcosgad/new-tips-in-laravel-1a9d
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To