@foreach($categories as $category)
@if(!empty($category->subCategories) and count($category->subCategories))
@foreach($category->subCategories as $subCategory)
id,$occupations)) checked="checked" @endif>
@endforeach
@else
id,$occupations)) checked="checked" @endif>
@endif
@endforeach
@if($errors->has('occupations'))
{{ $errors->first('occupations') }}
@endif