PHP code example of jeffersongoncalves / laravel-markdown

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

    

jeffersongoncalves / laravel-markdown example snippets


return [
    'html_input' => 'escape',
    'allow_unsafe_links' => false,
    'heading_permalink' => [
        'symbol' => '#',
        'html_class' => 'md-anchor',
        'id_prefix' => '',
    ],
];

use JeffersonGoncalves\Markdown\Markdown;

// Render GitHub Flavored Markdown to HTML
$html = Markdown::render('# Hello **world**');

// Enable heading permalink anchors (adds <a class="md-anchor"> to each heading)
$html = Markdown::render($readme, headingPermalinks: true);

$html = Markdown::render(<<<'MD'

// config/markdown.php
'html_input' => 'allow',
bash
php artisan vendor:publish --tag="markdown-config"

MD);
// => <pre><code>…<span class="hl-keyword">echo</span>…</code></pre>