1. Go to this page and download the library: Download code16/sharp-doc-reader 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/ */
code16 / sharp-doc-reader example snippets
namespace App\Sharp\Entities;
use Code16\SharpDocs\Sharp\DocsEntity;
class AdminDocsEntity extends DocsEntity
{
protected string $label = 'Docs';
protected function docsPath(): string
{
return base_path('docs/sharp');
}
}
protected function markdownOptions(): array
{
return [
// CommonMark configuration, merged over the defaults
'commonmark' => ['html_input' => 'strip'],
// Additional CommonMark extensions (instances or class names)
'extensions' => [\League\CommonMark\Extension\Attributes\AttributesExtension::class],
// Set to false to keep the headings as they are, the first h1