Rodney Zanoria
Rodney Zanoria

Reputation: 494

@if conditional in blade for more than one value

I currently have this in my blade

@if( $generatetypeofSummaryofMembers == 'breakdownMemType' )
    some codes here
@endif

How do I write it if I want to put in more than one value, like 'breakdownMemType', 'breakdownStatType', etc

Upvotes: 0

Views: 451

Answers (1)

Su Mon
Su Mon

Reputation: 46

You can use if more than one if statement as below.

@if($generatetypeofSummaryofMembers == 'breakdownMemType')
   some codes here
@else($generatetypeofSummaryofMembers == 'breakdownStatType')
   some codes here
@end if

If you want to use multiple in one if statement you can use || or AND.

Upvotes: 1

Related Questions