PHP code example of haleks / laravel-markdown

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

    

haleks / laravel-markdown example snippets


...
    'providers' => [
        ...
        Haleks\Markdown\MarkdownServiceProvider::class,

    ],
...

    'aliases' => [
        ...
        // Optional facade
        'Markdown' => Haleks\Markdown\Facades\Markdown::class,

    ],
...

$html = Markdown::convertToHtml('# title');

{!! Markdown::convertToHtml('# title') !!}

{% '# title' %}

{% $variable or 'default' %}

@{% javascript stuff %}

// *.md
# title

text

// *.md.php
#  echo 'title' 

// *.md.php
 echo '# title' 

// *.md.blade.php
# {{ 'title' }}

text

// *.md.blade.php
{{ '# title' }}

text
 bash
php artisan vendor:publish