@foreach(App\Subcategory::where('status','1')->where('parent_cat','=',$catid)->get(); as $item)

    id ? "checked" : "" }}@endforeach @endif id="subcategories{{$item->id}}" type="checkbox" class="required_one categories s_cat" name="sub_id[]" value="{{$item->id}}"> {{$item->title}}

    @php $dataList = $item->childcategory->where('status','1')->all(); @endphp
    @foreach($dataList as $data)
    @endforeach
    @endforeach