PHP code example of mindtwo / laravel-markdown
1. Go to this page and download the library: Download mindtwo/laravel-markdown 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/ */
mindtwo / laravel-markdown example snippets
use mindtwo\LaravelMarkdown\CleanupMarkdown;
$markdown = "# **Bold Heading**\n## **Bold Subheading**";
$cleanedMarkdown = (new CleanupMarkdown())->execute($markdown, 2);
echo $cleanedMarkdown;
// Outputs:
// ## Heading
// ### Subheading
$cleanedMarkdown = (new CleanupMarkdown())->execute($markdown, 3); // Max headline level is 3