@if(!empty($parentDetail))
<label for="inputError" class="col-sm-2 control-label">Parent<em>*</em></label>
<div class="col-sm-10">
    <select name="parent_id" class="form-control">
        <option value="">Select</option>
        @foreach($parentDetail as $key => $option)
        @if(!empty($data))
        <option @if($data->parent_id == $key) {{'selected'}} @endif value="<?php echo $key; ?>"><?php echo 
        $option; ?></option>
        @else
        <option value="<?php echo $key; ?>"><?php echo 
        $option; ?></option>
        @endif
        @endforeach
    </select>
</div>
@endif