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

Category

@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){ echo ''; categoryTree($value->cat_id, $sub_mark.'---'); } } } @endphp
@endsection