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'



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2acnUSf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire