PHP code example of kitzberger / cakephp-markdown

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

    

kitzberger / cakephp-markdown example snippets


class FooController extends AppController
{
    public function initialize(): void
    {
        parent::initialize();
        $this->viewBuilder()->setHelpers(['Tanuck/Markdown.Markdown']);
    }
}

echo $this->Markdown->transform($myMarkdownSyntax);

class FooController extends AppController
{
    public function initialize(): void
    {
        parent::initialize();
        $this->viewBuilder()->setHelpers([
			'Tanuck/Markdown.Markdown' => [
				'parser' => 'GithubMarkdown',
			]
		]);
    }
}