1. Go to this page and download the library: Download birdcar/markdown-laravel 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/ */
birdcar / markdown-laravel example snippets
use Illuminate\Support\Str;
// Full BFM render (block-level HTML)
Str::bfm('# Hello **world**');
// Inline render (strips wrapping <p> tag)
Str::inlineBfm('Hello **world**');
return [
// Output format: 'html', 'email', or 'plain'
'profile' => 'html',
// Custom resolvers (resolved from the container)
'resolvers' => [
'mention' => null, // class implementing MentionResolverInterface
'embed' => null, // class implementing EmbedResolverInterface
],
];
bash
php artisan vendor:publish --tag=bfm-config
bash
# Publish the CSS to public/vendor/bfm/
php artisan vendor:publish --tag=bfm-assets
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.