@foreach($c as $i)
<a href="{{route('category',$i->id)}}">{{$i->name}}</a>
@foreach($i->children($i->id) as $j)
<a href="{{route('category',$j->id)}}"> -- {{$j->name}}</a>
@endforeach
@endforeach