Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

Render breadcrumbs as HtmlString #146

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/View.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php namespace DaveJamesMiller\Breadcrumbs;

use Illuminate\Contracts\View\Factory as ViewFactory;
use Illuminate\Support\HtmlString;

class View {

Expand All @@ -16,7 +17,9 @@ public function render($view, $breadcrumbs)
if (!$view)
throw new Exception('Breadcrumbs view not specified (check the view in config/breadcrumbs.php, and ensure DaveJamesMiller\Breadcrumbs\ServiceProvider is loaded before any dependants in config/app.php)');

return $this->factory->make($view, compact('breadcrumbs'))->render();
return new HtmlString(
$this->factory->make($view, compact('breadcrumbs'))->render()
);
}

}