2👍
✅
if alert
should always be present you could write:
<div :class="['alert', item.created_at ? 'alert-success':'alert-warning']">...</div>
Don’t concatenate in the bindings, use the list notation!
Source:stackexchange.com