0

I'm new to laravel and I would like to ask how to install php markdown library into Laravel 4?

I know how to install a laravel package, but I have no idea on how to install a php file.

Do anyone know how to install it? or using composer?

Library source: http://michelf.ca/projects/php-markdown/

1 Answer 1

4

The library is exist on packagist anyway: https://packagist.org/packages/michelf/php-markdown , so you can use composer. Edit composer.json add following line to "require" property:

"michelf/php-markdown": "1.4.*"

run:

composer update

Now you can use it like:

 \Michelf\Markdown::defaultTransform($my_text);
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. This solved my problem too. But what I do is just include this line require_once('C:\wamp\www\app\helpers\markdown.php'); Thanks again!
I believe the way I describe above is recommended way since you get your library manageable by composer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.