mercredi 20 novembre 2019

Str::endsWith() Laravel - best practice to check multiple cases?

just a quick one.

I've been using Str::endsWith to check a couple of strings and ensure some domains are blocked from signing up to my site.

Just wondered if there was a good way to pass multiple 'checks' to Str::endsWith in Laravel.

$result = Str::endsWith($email_address, '@mail.ru');

Can I pass an array in as the second argument for it to check multiple extensions for example?

Thanks very much!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire