@if($errors->has('agent_name'))
{{ $errors->first('agent_name') }}
@endif
@if($errors->has('agent_email'))
{{ $errors->first('agent_email') }}
@endif
@if($errors->has('agent_phone'))
{{ $errors->first('agent_phone') }}
@endif
@if($errors->has('agent_street_address'))
{{ $errors->first('agent_street_address') }}
@endif
@if($errors->has('agent_city'))
{{ $errors->first('agent_city') }}
@endif
@if($errors->has('agent_state'))
{{ $errors->first('agent_state') }}
@endif
@if($errors->has('agent_postal_code'))
{{ $errors->first('agent_postal_code') }}
@endif
{{ Form::select('agent_country_id', get_countries(), old('agent_country_id',$property->agent ? $property->agent->country_id : ''), ['class'=>'form-select',
'id'=>'agent_country_id','placeholder' => '---Select--']) }}
@if($errors->has('agent_country_id'))
{{ $errors->first('agent_country_id') }}
@endif
@php
//$agent_image_url = $property->agent->getFirstMediaUrl('agent-image');
if($property->agent){
if(count($property->agent->getMedia('agent-image')) > 0){
$agent_image_url = $property->agent->getMedia('agent-image')->last()->getUrl();
}else{
$agent_image_url = '';
}
}else{
$agent_image_url = '';
}
@endphp
@if($errors->has('image'))
{{ $errors->first('image') }}
@endif
[.png, .jpg, .jpeg files only, Max size: 2MB]