<?php
//$route = Route::current()->getUri();
$route = Request::path();
$explodeRoute = explode('/', $route);
array_shift($explodeRoute);
$lastRoute = last($explodeRoute);
//dump($explodeRoute);
?>
<div class="page-breadcrumbs">
    <?php $valUrl = '' ?>
    <ul class="breadcrumb">
        <li class="active">
            <i class="fa fa-home"></i>
            <a href="{{ url('superadmin') }}"> Inicio </a>
        </li>
        @if(isset($explodeRoute) && count($explodeRoute) > 0)
            @foreach ($explodeRoute as $key=>$value)
                <?php $valUrl .= $value ?>
                <li>
                    @if($lastRoute != $value)
                        <a href="{{ url('superadmin/'.$valUrl) }}">
                            {{ ucfirst(str_slug($value, ' ')) }}
                        </a>
                    @else
                        {{ ucfirst(str_slug($value, ' ')) }}
                    @endif
                </li>
                <?php $valUrl .= '/'?>
            @endforeach
        @endif
    </ul>
</div>
