Hy now i have this code
<div class="row">
<div class="col-xs-12 col-md-6 left">
@if(in_array($profile->Entity_Id,$likes))
<a class="btn btn-sm btn-primary" href="{{URL::route('displayProfile',array('profile_id' => $profile->Entity_Id))}}">
<i class="icon-visual-eye-fill icon"></i>1</a>
@else
<button type="button" class="btn btn-sm btn-primary view-profile" profile-id="{{$profile->Entity_Id}}">
<i class="icon-visual-eye-fill icon"></i>not</button>
@endif
</div>
<div class="col-xs-12 col-md-6 right">
@if(in_array($profile->Entity_Id,$likes))
<a class="btn btn-sm btn-info" href="{{URL::route('messageProfile',array('profile_id' => $profile->Entity_Id))}}">
<i class="icon-envelope-fill-1 icon"></i> 2</a>
@else
<button type="button" class="btn btn-sm btn-info message-profile" profile-id="{{$profile->Entity_Id}}">
<i class="icon-envelope-fill-1 icon"></i> not</button>
@endif
</div>
now its based on the likes, i whant to be based if Entity_Id1=Entity_Id2 (row in sql) how its it possible ?