Created
March 30, 2025 08:42
-
-
Save otonielguajardo/afe402145f846a3eca7f6887708c8107 to your computer and use it in GitHub Desktop.
[Jigsaw] Custom directives para escribir Markdown en Blade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** @var \Illuminate\View\Compilers\BladeCompiler $bladeCompiler */ | |
$bladeCompiler->directive('markdown', function () { | |
return "<?php echo(\Illuminate\Support\Str::markdown(<<<HEREDOC"; | |
}); | |
$bladeCompiler->directive('endmarkdown', function () { | |
return "HEREDOC)); ?>"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment