Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
tipuloidea
/
back
/
vendor
/
knuckleswtf
/
scribe
/
src
/
Tools
:
BladeMarkdownEngine.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Knuckles\Scribe\Tools; use Illuminate\Filesystem\Filesystem; use Illuminate\View\Compilers\CompilerInterface; use Illuminate\View\Engines\CompilerEngine; use Parsedown; class BladeMarkdownEngine extends CompilerEngine { private Parsedown $markdown; public function __construct(CompilerInterface $compiler, ?Filesystem $files = null) { parent::__construct($compiler, $files ?: new Filesystem); $this->markdown = Parsedown::instance(); } /** * Get the evaluated contents of the view. * */ public function get($path, array $data = []) { $contents = parent::get($path, $data); return $this->markdown->text($contents); } }