<?php namespace App\Services;

class Markdown {

    public function __construct()
    {

    }

    public function convertHtmlToMarkdown($html)
    {

    }

    public function convertMarkdownToHtml($markdown)
    {

    }

}





<?php namespace App\Services;

use Parsedown;

class Markdown {

    protected $parsedown;

    public function __construct()
    {
        $this->parsedown = new Parsedown();
    }

    public function convertHtmlToMarkdown($html)
    {

    }

    public function convertMarkdownToHtml($markdown)
    {
        $convertedHtml = $this->parsedown->text($markdown);
        return $convertedHtml;
    }

}





Add the method to enable converting user input markdown into html.
Add the method to enable converting user input markdown into html.
