<?php
$route = Request::path();
$explodeRoute = explode('/', $route);
//array_shift($explodeRoute);
$lastRoute = last($explodeRoute);
//dump($explodeRoute);
$valUrl = "";
?>
<ol class="breadcrumb">
    <li class="active">
        <i class="fa fa-home"></i>
        <a href="<?php echo e(route('admin.index')); ?>">Inicio</a>
    </li>
    <?php if(isset($explodeRoute) && count($explodeRoute) > 0): ?>
        <?php foreach($explodeRoute as $key => $value): ?>
            <?php $valUrl .= $value ?>
            <li>
                <?php if($lastRoute != $value): ?>
                    <a href="<?php echo e(url($valUrl)); ?>">
                        <?php echo e(ucfirst(str_slug($value, ' '))); ?>

                    </a>
                <?php else: ?>
                    <?php echo e(ucfirst(str_slug($value, ' '))); ?>

                <?php endif; ?>
            </li>
            <?php $valUrl .= '/'?>
        <?php endforeach; ?>
    <?php endif; ?>
</ol>