mardi 7 août 2018

Can i pass array of options to compare in an if statement

I need to check is a user from a few countries in my laravel project.

Obviously I can do this

if($user->country == 'Ireland' || $user->country == 'England')

Is there a way to clean this up?

Aucun commentaire:

Enregistrer un commentaire