Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Markdown for Laravel
PHP
Tree: 8a8f91bdb5

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
controllers
LICENSE
bundle.php
parser.php
readme.md
start.php
view.php

readme.md

Markdown for Laravel

A simple bundle to provide Markdown and Markdown Extra functions.

Links and image URLs are passed through Laravel\URL::to and Larave\URL::to_asset.

Installation

Drop the Markdown bundle into your /bundles directory.

Parse some text

Just start using Markdown\Markdown

echo Markdown\Markdown($text);

View a markdown file

You can create Markdown\View objects, like Laravel\View objects

Router::register('GET /about', function()
{
    // View of application/views/about.md
    return Markdown\View::make('about');

    // Also supports bundles and paths...
    // View of bundles/bundle/views/path/file.md
    return Markdown\View::make('bundle::path.file');
});

And you can route to the handy controller (needs 1 parameter).

Router::register('GET /(about)', 'markdown::page@show');
Something went wrong with that request. Please try again.