@extends('front._layouts.master') @section('content') @foreach($categories as $category)

@php $categoryName = $category->name; $parts = explode('/', $categoryName); $formattedCategoryName = $parts[0]; if (count($parts) > 1) { $formattedCategoryName .= '
| ' . implode('/', array_slice($parts, 1)) . ''; } @endphp

@endforeach @endsection @section('scripts') @endsection