PHP code example of harrk / laravel-commonmark

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

    

harrk / laravel-commonmark example snippets


use \League\CommonMark\CommonMarkConverter;

class MyClass {

    public function myFunction(CommonMarkConverter $converter) {
        return $converter->convertToHtml('# H1 Header');
    }
    
}

class MyClass {

    public function myFunction() {
        return markdown_to_html('# H1 Header');
    }
    
}