Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 18, 2021 09:14 am GMT

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:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To