Using laravel, I'm making an if with many || conditions, and I have to write the same syntaxes over and over.
My code example:
if (type == 1 || type == 2 || type == 3 || type == 4){
// my code
}
Is there any shorthand syntax for this? Maybe like an IN operator in SQL.
IF type IN (1, 2, 3, 4)