PHP code example of tomakee / laravel-markdown-wrapper
1. Go to this page and download the library: Download tomakee/laravel-markdown-wrapper 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/ */
tomakee / laravel-markdown-wrapper example snippets
//parse markdown file
$html = markdown_file('path.to.markdownfile'); //path format is same as Laravel view.
//You can set different resources path.
//But if your project always use different path from default,
//change the config setting (app/config/markdown.php).
$html = markdown_file('path.to.markdownfile', [resources path,,,,]);
//parse markdown text
$html = Markdown::parse('some markdown text.');
//parse markdown file
$html = Markdown::file('path.to.markdownfile'); //path format is same as Laravel view.
//You can set different resources path.
//But if your project always use different path from default,
//change the config setting (app/config/markdown.php).
$html = Markdown::file('path.to.markdownfile', [resources path,,,]);
//parse markdown text
$html = app('markdown')->parse('some markdown text.');
//parse markdown file
$html = app('markdown')->file('path.to.markdownfile'); //path format is same as Laravel view.
//You can set different resources path.
//But if your project always use different path from default,
//change the config setting (app/config/markdown.php).
$html = app('markdown')->file('path.to.markdownfile', [resources path,,,]);