@if (count($categories) > 0) @foreach ($categories as $category) @if ($category->parent_id != null) @php $categoryparent = App\Models\Category::where('id', $category->parent_id)->first(); @endphp {{ url('category/' . $categoryparent->slug . '/' . $category->slug).'/' }} {{ $category->updated_at->setTimezone('Asia/Tehran')->toAtomString() }} @endif @if ($category->parent == 1) {{ url('category/' . $category->slug).'/' }} {{ $category->updated_at->setTimezone('Asia/Tehran')->toAtomString() }} @endif @endforeach @endif