1. Go to this page and download the library: Download goez/laravel-fakedown 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/ */
goez / laravel-fakedown example snippets
use Goez\LaravelFakedown\Facades\Fakedown;
// Generate basic Markdown content
$markdown = Fakedown::generate();
// Generate content with specific language, length and style
$markdown = Fakedown::generate([
'language' => 'en',
'length' => 5,
'style' => 'music' // Music style
]);
// Supported styles
$styles = [
'professional', // Professional style
'casual', // Casual style
'technical', // Technical style
'music', // Music style
'art', // Art style
'technology', // Technology style
'gaming', // Gaming style
'sports', // Sports style
'travel', // Travel style
'food', // Food style
'health', // Health style
'education', // Education style
'business', // Business style
'software' // Software development style
];
// Generate specific elements
$heading = Fakedown::heading(1, 'en');
$paragraph = Fakedown::paragraph('en');
$list = Fakedown::list();
$codeBlock = Fakedown::codeBlock();
$table = Fakedown::table();
$title = Fakedown::title('en', 'professional'); // Generate unique title
use Goez\LaravelFakedown\Facades\Fakedown;
// Generate a single title
$title = Fakedown::title();
echo $title; // e.g., "Deep Analysis of Frontend Development Best Practices"
// Specify language and style
$title = Fakedown::title('en', 'professional');
// Generate multiple unique titles
for ($i = 0; $i < 5; $i++) {
echo Fakedown::title() . "\n";
}
use Goez\LaravelFakedown\FakedownGenerator;
$generator = new FakedownGenerator();
// Generate titles and check cache
$title1 = $generator->title();
$title2 = $generator->title();
// View generated titles
$generatedTitles = $generator->getGeneratedTitles();
echo "Generated " . count($generatedTitles) . " titles\n";
// Clear title cache
$generator->clearTitleCache();
// Generate new title after clearing (may repeat previous titles)
$newTitle = $generator->title();