How to use the Laravel ternary operator