@extends('Admin.Layout.main_layout') @section('main_container')

Product

@php function categoryTree($parent_id = 0, $sub_mark = ''){ $query = DB::table('category')->where('parent_id','=', $parent_id)->get(); if(count($query) > 0){ foreach($query as $value){ $s=""; echo ''; categoryTree($value->cat_id, $sub_mark.'---'); } } } @endphp
@endsection