@if($units->count())

@foreach($units as $unit)
    <option {{old('unit_id', $lesson ?? null ? $lesson->unit_id : null) == $unit->id ? 'selected' : ''}} value="{{$unit->id}}">{{$unit->name['name_'.getCurrentLocale()]}}</option>
@endforeach
@else
    <option>No data</option>
@endif
