Package Data | |
---|---|
Maintainer Username: | maherbusnes |
Maintainer Contact: | buzzyllab@gmail.com (buzzylab) |
Package Create Date: | 2016-06-25 |
Package Last Update: | 2020-09-17 |
Home Page: | |
Language: | CSS |
License: | MIT |
Last Refreshed: | 2024-11-19 03:15:31 |
Package Statistics | |
---|---|
Total Downloads: | 7,257 |
Monthly Downloads: | 42 |
Daily Downloads: | 0 |
Total Stars: | 29 |
Total Watchers: | 4 |
Total Forks: | 3 |
Total Open Issues: | 1 |
A New Markdown
parser for Laravel built on Parsedown and Parsedown Extra.
The best and easiest way to install this package is through Composer.
This package fully compatible with Laravel ^5.4
.
Open your application's composer.json
file and add the following line to the require
array:
"buzzylab/laradown": "0.1.*"
Note: Make sure that after the required changes your
composer.json
file is valid by runningcomposer validate
.
After installing the package, open your Laravel config file located at config/app.php
and add the following service provider to the $providers
array:
Buzzylab\Laradown\MarkdownServiceProvider::class,
Note: Checkout Laravel's Service Providers and Service Container documentation for further details.
And add the following to $aliases
'Markdown' => Buzzylab\Laradown\Facades\MarkdownFacade::class
<?php
echo Markdown::render(); // OR echo Markdown::convert();
That's all.
@markdown
directive with parameter:@extends('layouts.master')
@section('content')
<div>
{{-- $content is markdown data --}}
@markdown($content)
</div>
@stop
@markdown
with @endmarkdown
as directive block:@extends('layouts.master')
@section('content')
<div>
@markdown
# Laradown Packag
@endmarkdown
</div>
@stop
@markdownstyle
{{-- Get defaute style file --}}
@markdownstyle
{{-- Custom style file --}}
@markdownstyle($file)
markdown($markdown)
Convert markdown content to html
markdown_style()
Add style to converted html
This software is released under The MIT License (MIT).