Van1310
216
5
Laravel

if condition cant work

Posted 2 months ago by Van1310

i try to check if round_type field has data then condtion move on else if but cant work

here is my controller

public function view($id)
{
    $user=User::where('role','=','user')->first();
    $interviewschedule = Interviewschedule::where('user_id','=',$user->id)->pluck('round_type');
    return view('admin.pages.interviewschedule',compact('interviewschedule','user'));
}

blade file

@if(empty($interviewschedule->round_type)) 
    Data empty
@elseif($interviewschedule->round_type="basic")
    Has Basic Data
@else
    False
@endif

when try to condtion i have basic record in my field round_type but cant work elseif condtion every time is if condtion check

Please sign in or create an account to participate in this conversation.