예제 #1
0
 public function index()
 {
     $breadcrumbs = new \Creitive\Breadcrumbs\Breadcrumbs();
     $breadcrumbs->addCrumb('Home', '/');
     $breadcrumbs->addCrumb('Pages', 'pages');
     $breadcrumbs->addCrumb('Subpage', 'subpage');
     $breadcrumbs->addCrumb('Subsubpage', '/subsubpage');
     $breadcrumbs->addCrumb('Other website', 'http://otherwebsite.com/some-page');
     $miga = $breadcrumbs->render();
     $registros = Registro::all();
     return view('registros.index', array('registros' => $registros, 'breadcrumbs' => $miga));
 }
예제 #2
0
파일: helpers.php 프로젝트: snudur/nvcms
function kalCrumbs($uri)
{
    $breadcrumbs = new Creitive\Breadcrumbs\Breadcrumbs();
    $breadcrumbs->addCrumb('Heim', '/');
    $breadcrumbs->setDivider('');
    $breadcrumbs->setCssClasses('kal-crumbs');
    $parts = array_filter(explode("/", $uri));
    foreach ($parts as $part) {
        foreach (config('formable.hlutir') as $hlutur) {
            $class = "\\App\\" . ucfirst($hlutur);
            $m = new $class();
            $item = $m->where('slug', $part)->first();
            if (!$item) {
                continue;
            }
            $breadcrumbs->addCrumb($item->title, $item->slug);
        }
    }
    echo $breadcrumbs->render();
}
예제 #3
0
파일: helpers.php 프로젝트: stjanilofts/cp
function kalCrumbs()
{
    $breadcrumbs = new Creitive\Breadcrumbs\Breadcrumbs();
    $breadcrumbs->addCrumb('<i class="uk-icon-home uk-margin-right"></i>Heim', '/');
    $breadcrumbs->setDivider('');
    $breadcrumbs->setCssClasses('kal-crumbs uk-margin-top');
    $parts = array_filter(explode("/", \Request::path()));
    foreach ($parts as $part) {
        foreach (config('formable.hlutir') as $hlutur) {
            $class = "\\App\\" . ucfirst($hlutur);
            $m = new $class();
            $item = $m->where('slug', $part)->first();
            if (!$item) {
                continue;
            }
            $breadcrumbs->addCrumb($item->title, $item->slug);
        }
    }
    if (\Request::is('veftre')) {
        $breadcrumbs->addCrumb('Veftré', 'veftre');
    }
    if (\Request::is('karfa') || \Request::is('cart')) {
        $breadcrumbs->addCrumb('Karfa', 'karfa');
    }
    if (\Request::is('checkout') || \Request::is('pontun')) {
        $breadcrumbs->addCrumb('Karfa', 'karfa');
        $breadcrumbs->addCrumb('Pöntun', 'checkout');
    }
    echo $breadcrumbs->render();
}