PHP code example of maxxscho / laravel-markdown-plus
1. Go to this page and download the library: Download maxxscho/laravel-markdown-plus library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maxxscho / laravel-markdown-plus example snippets
'providers' => [
// ...
'Maxxscho\LaravelMarkdownPlus\LaravelMarkdownPlusServiceProvider',
],
'aliases' => [
// ..
'MarkdownPlus' => 'Maxxscho\LaravelMarkdownPlus\Facade\LaravelMarkdownPlusFacade',
],
$file = File::get('test.md');
$document = MarkdownPlus::make($file);
$content = $document->getContent();
$title = $document->title(); // magic method
return View::make('your-view', compact('title', 'content'));