samedi 30 juillet 2016

How to convert this short if statement in Laravel into a long one?

I have a short if else statement that I'm having trouble converting into a full one.

The reason is I would like to include some html inside instead of just text.

Auth::user()->likes()->where('status_id', $status->id)->first() ? Auth::user()->likes()->where('status_id', $status->id)->first()->like == 1 ? 'You like this post' : 'Like' : 'Like'



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire