I'm trying to change the look of a button based on whether the user has liked an image by using 1 class if he has and another class if he hasn't but I'm getting a parse error which I can not find. Of course the reason could be that I'm trying to do something that can't be done like that.
<a href='#' class='vote {{ Auth::user()->votes()->where("image_id", $image->id)->first() ? Auth::user()->votes()->where("image_id", $image->id)->first()->like == 1 ? "liked" : "like" }}' id='{{$image->id}}'></a>