Exemplo n.º 1
0
 public function testGenerate()
 {
     $breadcrumbs = Breadcrumbs::generate('post', $this->post);
     $this->assertCount(3, $breadcrumbs);
     $this->assertSame('Home', $breadcrumbs[0]->title);
     $this->assertSame('/', $breadcrumbs[0]->url);
     $this->assertTrue($breadcrumbs[0]->first);
     $this->assertFalse($breadcrumbs[0]->last);
     $this->assertSame('Sample Category', $breadcrumbs[1]->title);
     $this->assertSame('/category/456', $breadcrumbs[1]->url);
     $this->assertFalse($breadcrumbs[1]->first);
     $this->assertFalse($breadcrumbs[1]->last);
     $this->assertSame('Sample Post', $breadcrumbs[2]->title);
     $this->assertSame('/blog/123', $breadcrumbs[2]->url);
     $this->assertFalse($breadcrumbs[2]->first);
     $this->assertTrue($breadcrumbs[2]->last);
 }
Exemplo n.º 2
0
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"  lang="{{ LaravelLocalization::getCurrentLangCode() }}">
	<head>
		<?php 
$b = Breadcrumbs::generate();
?>
		<title>{{ (Route::currentRouteName() == 'home') ? trans('general.main-description') : end($b)->title }}</title>		

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<meta name="description" content="<?php 
echo substr(trim($__env->yieldContent('description')), 0, 155);
?>
" />
		<meta name="keywords" content="<?php 
echo substr(trim($__env->yieldContent('keywords')), 0, 155);
?>
" />
		<meta name="Author" content="Your name" />
		<meta name="Robots" content="index,follow">
		<meta name="revisit-after" content="1 days">

		<link rel="author" href="https://plus.google.com/114183900135001854492" />
		<link type="text/css" rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
		<link type="text/css" rel="stylesheet" href="{{ URL::asset('assets/css/jquery.cookiebar.css') }}" />
		<link type="text/css" rel="stylesheet" href="{{ URL::asset('assets/css/style.css?v=1.1.4') }}" />

		
		<script src="//code.jquery.com/jquery-1.10.2.js"></script>
		<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
		<script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>