PHP code example of mkveksas / laravel-markdown

1. Go to this page and download the library: Download mkveksas/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/ */

    

mkveksas / laravel-markdown example snippets


$markdown = "# Hello";

$html = Markdown::parse($markdown) // <h1>Hello</h1>

$html = markdown('# Hello'); // <h1>Hello</h1>

$html = markdown_capture(function () {
    echo "# Hello";
    echo "\n\n";
    echo "So **cool**!"
});

// <h1>Hello</h1>
// <p>So <b>cool</b>!</p>

$parser = app('Indal\Markdown\Parser');
$html = $parser->parse('# Hello'); // <h1>Hello</h1>