I saw this example in Laravel Docs :
Blade::extend(function($view, $compiler) { $pattern = $compiler->createMatcher('datetime'); return preg_replace($pattern, '$1<?php echo $2->format(\'m/d/YH:i\'); ?>', $view); });
but I don't seem to understand this, and for a while, examples on the Internet include $ 3.
I did not find the right answer to this question through a Google search, I appreciate any help.
source share